Bug #70663 [Opn->Csd]: Object operator not accepted after parenthesis enclosing assignment

From: Date: Wed, 07 Oct 2015 21:44:03 +0000
Subject: Bug #70663 [Opn->Csd]: Object operator not accepted after parenthesis enclosing assignment
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196464@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70663&edit=1 ID: 70663 Updated by: nikic@php.net Reported by: teo8976 at gmail dot com Summary: Object operator not accepted after parenthesis enclosing assignment -Status: Open +Status: Closed Type: Bug Package: Scripting Engine problem PHP Version: 5.6.14 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: This will be supported in PHP 7, see https://wiki.php.net/rfc/uniform_variable_syntax. Previous Comments: ------------------------------------------------------------------------ [2015-10-07 21:42:30] teo8976 at gmail dot com Description: ------------ See below Test script: --------------- <?php class Test { public $test=3; } echo ($test=new Test())->test; Expected result: ---------------- 3 Actual result: -------------- Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' I may be wrong but I seem to remember the same bug with the [] operator being fixed ages ago. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70663&edit=1

« previous php.bugs (#196464) next »