summaryrefslogtreecommitdiff
path: root/tests/classes/bug27468.phpt
blob: 4ef8d44a61d094e451986b5ca370a9052c617bb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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--
Warning: Undefined property: foo::$x in %s on line %d

Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4
OK