summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lang/bug17115.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lang/bug17115.phpt b/tests/lang/bug17115.phpt
new file mode 100644
index 0000000000..0cb3bf44d2
--- /dev/null
+++ b/tests/lang/bug17115.phpt
@@ -0,0 +1,16 @@
+--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)