mirror of
https://github.com/php/php-src.git
synced 2024-12-01 22:03:36 +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)
|