ID: 39017 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 5.1.6 Assigned To: dmitry
Previous Comments: ------------------------------------------------------------------------ [2006-10-02 16:26:56] [EMAIL PROTECTED] Description: ------------ The foreach construct destroys the object, leaving the variable in a strange state. class A {} foreach(($a = new A) as $v); var_dump($a); // UNKNOWN:0 echo $a; // segfaults This was spotted by Zuu on [EMAIL PROTECTED] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39017&edit=1