summaryrefslogtreecommitdiff
path: root/tests/classes/bug27468.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/classes/bug27468.phpt')
-rw-r--r--tests/classes/bug27468.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/classes/bug27468.phpt b/tests/classes/bug27468.phpt
new file mode 100644
index 0000000..58a7b6c
--- /dev/null
+++ b/tests/classes/bug27468.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #27468 (foreach in __destruct() causes segfault)
+--FILE--
+<?php
+class foo {
+ function __destruct() {
+ foreach ($this->x as $x);
+ }
+}
+new foo();
+echo 'OK';
+?>
+--EXPECTF--
+Notice: Undefined property: foo::$x in %sbug27468.php on line 4
+
+Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4
+OK