#22504 [Opn->Dup]: new $foo->bar causes parse error
| From: | sander@php.net | Date: | Sun, 02 Mar 2003 11:15:14 +0000 |
| Subject: | #22504 [Opn->Dup]: new $foo->bar causes parse error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34614@lists.php.net to get a copy of this message | ||
ID: 22504
Updated by: sander@php.net
Reported By: sander@php.net
-Status: Open
+Status: Duplicate
Bug Type: Zend Engine 2 problem
Operating System: Debian Linux (unstable)
PHP Version: 5CVS-2003-03-02 (dev)
New Comment:
Sorry, this is a dupe of #21669. The bugsystem doesn't show PHP5 bugs
by default... :(
Previous Comments:
------------------------------------------------------------------------
[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