summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_025.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/closure_025.phpt')
-rw-r--r--Zend/tests/closure_025.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/tests/closure_025.phpt b/Zend/tests/closure_025.phpt
new file mode 100644
index 0000000..8ee187e
--- /dev/null
+++ b/Zend/tests/closure_025.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Closure 025: Using closure in create_function()
+--FILE--
+<?php
+
+$a = create_function('$x', 'return function($y) use ($x) { return $x * $y; };');
+
+var_dump($a(2)->__invoke(4));
+
+?>
+--EXPECT--
+int(8)