php-src/Zend/tests/bug39017.phpt
2012-10-10 10:27:49 +08:00

12 lines
206 B
PHP

--TEST--
Bug #39017 (foreach(($obj = new myClass) as $v); echo $obj; segfaults)
--FILE--
<?php
class A {}
foreach(($a=(object)new A()) as $v);
var_dump($a); // UNKNOWN:0
?>
--EXPECTF--
object(A)#%d (0) {
}