summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-05-23 23:27:24 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-05-23 23:27:24 +0000
commit2e5013efecd1b94eb37e22ff7150b7e04c4655f6 (patch)
tree87535268afdef893542c7ffca986b12d1cbe637f /tests
parenta8b38817aca2afaa36b54d48a0760410e28e2923 (diff)
downloadphp-git-2e5013efecd1b94eb37e22ff7150b7e04c4655f6.tar.gz
Added test case for bug #17115
Diffstat (limited to 'tests')
-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)