xref: /php-src/Zend/tests/bug39017.phpt (revision 610c7fbe)
1--TEST--
2Bug #39017 (foreach(($obj = new myClass) as $v); echo $obj; segfaults)
3--FILE--
4<?php
5class A {}
6foreach(($a=(object)new A()) as $v);
7var_dump($a); // UNKNOWN:0
8?>
9--EXPECTF--
10object(A)#%d (0) {
11}
12