xref: /PHP-7.1/tests/lang/bug17115.phpt (revision 2e5013ef)
1--TEST--
2Bug #17115 (lambda functions produce segfault with static vars)
3--FILE--
4<?php
5$func = create_function('','
6	static $foo = 0;
7	return $foo++;
8');
9var_dump($func());
10var_dump($func());
11var_dump($func());
12?>
13--EXPECT--
14int(0)
15int(1)
16int(2)
17