#22504 [Dup->Bgs]: new $foo->bar causes parse error

From: Date: Sun, 02 Mar 2003 18:07:01 +0000
Subject: #22504 [Dup->Bgs]: new $foo->bar causes parse error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34624@lists.php.net to get a copy of this message
ID: 22504 Updated by: sniper@php.net Reported By: sander@php.net -Status: Duplicate +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Debian Linux (unstable) PHP Version: 5CVS-2003-03-02 (dev) New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PHP. there is that version box too in the advanced search.. :-p Previous Comments: ------------------------------------------------------------------------ [2003-03-02 05:15:13] sander@php.net Sorry, this is a dupe of #21669. The bugsystem doesn't show PHP5 bugs by default... :( ------------------------------------------------------------------------ [2003-03-02 05:12:02] sander@php.net Consider the following snippet: class foo { var $bar = 'foo'; } $foo = new foo(); $bar = new $foo->bar; // let's call this line 5 It runs fine on ZE1, but ZE2 bails out with "parse error, unexpected T_OBJECT_OPERATOR on line 5". This works fine, though: $tmp = $foo->bar; $bar = new $tmp; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22504&edit=1

« previous php.bugs (#34624) next »