mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
13 lines
207 B
PHP
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)
|