php-src/tests/lang/bug17115.phpt

18 lines
318 B
Plaintext
Raw Normal View History

2003-05-23 23:27:24 +00:00
--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());
?>
2017-01-30 21:09:32 +00:00
--EXPECTF--
Deprecated: Function create_function() is deprecated in %s on line %d
2003-05-23 23:27:24 +00:00
int(0)
int(1)
int(2)