ID: 37144 Comment by: smlerman at gmail dot com Reported By: [EMAIL PROTECTED] Status: Assigned Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.1.2 Assigned To: dmitry New Comment:
I don't get a segfault on Windows 5.1.1, Linux 5.1.1 (compiled on Ubuntu), or Linux 5.1.2 (compiled on Fedora). As a side note, should that even be valid syntax? Shouldn't the left side of assignment only allow variables (other than the special language construct list())? Isn't foo()->bar[1] an expression, not a variable? Previous Comments: ------------------------------------------------------------------------ [2006-04-20 08:30:53] [EMAIL PROTECTED] Description: ------------ PHP removes a temorary object then tryes to assign into its property. As a result we have SIGSEGV. Reproduce code: --------------- <?php function foo() { $x = new stdClass(); $x->bar = array(1); return $x; } foo()->bar[1] = "123"; echo "ok\n"; ?> Expected result: ---------------- ok Actual result: -------------- crash and/or memory leaks ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37144&edit=1