mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
17 lines
247 B
PHP
17 lines
247 B
PHP
--TEST--
|
|
Bug #17115 (lambda functions produce segfault with static vars)
|
|
--FILE--
|
|
<?php
|
|
$func = create_function('','
|
|
static $foo = 0;
|
|
return $foo++;
|
|
');
|
|
var_dump($func());
|
|
var_dump($func());
|
|
var_dump($func());
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|
|
int(1)
|
|
int(2)
|