#46452 [Opn->Bgs]: Whitespace can cause parser failure

From: Date: Sat, 01 Nov 2008 20:45:17 +0000
Subject: #46452 [Opn->Bgs]: Whitespace can cause parser failure
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130422@lists.php.net to get a copy of this message
ID: 46452 Updated by: jani@php.net Reported By: david at grudl dot com -Status: Open +Status: Bogus Bug Type: Compile Failure -Operating System: +Operating System: * PHP Version: 5.2.7RC2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2008-11-01 14:20:31] david at grudl dot com Description: ------------ Whitespace after object separator -> may cause failure of parser. (it is fixed in PHP 5.3) BTW: is '->' called object separator, or what is the right name? Reproduce code: --------------- class Foo { } $foo = new Foo; $foo->class = 10; // OK $foo->class(10); // OK $foo-> class = 10; // Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE $foo-> class(10); // Parse error too ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46452&edit=1

« previous php.bugs (#130422) next »