]> granicus.if.org Git - php/commitdiff
add test
authorAntony Dovgal <tony2001@php.net>
Wed, 4 Oct 2006 13:35:51 +0000 (13:35 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 4 Oct 2006 13:35:51 +0000 (13:35 +0000)
Zend/tests/bug39036.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug39036.phpt b/Zend/tests/bug39036.phpt
new file mode 100644 (file)
index 0000000..017012f
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Bug #39036 (Unsetting key of foreach() yields segmentation fault)
+--FILE--
+<?php
+
+$key = 'asdf';
+
+foreach (get_defined_vars() as $key => $value) {
+       unset($$key);
+}
+
+var_dump($key);
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Notice: Undefined variable: key in %s on line %d
+NULL
+Done