mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
13 lines
207 B
Plaintext
13 lines
207 B
Plaintext
|
--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)
|