php-src/Zend/tests/closure_025.phpt
2008-07-28 14:10:00 +00:00

13 lines
207 B
PHP

--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)