xref: /PHP-7.1/tests/classes/bug27468.phpt (revision 969dda1b)
1--TEST--
2Bug #27468 (foreach in __destruct() causes segfault)
3--FILE--
4<?php
5class foo {
6	function __destruct() {
7		foreach ($this->x as $x);
8	}
9}
10new foo();
11echo 'OK';
12?>
13--EXPECTF--
14Notice: Undefined property: foo::$x in %sbug27468.php on line 4
15
16Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4
17OK
18