#46452 [Bgs]: Whitespace can cause parser failure

From: Date: Sat, 01 Nov 2008 23:11:42 +0000
Subject: #46452 [Bgs]: Whitespace can cause parser failure
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130446@lists.php.net to get a copy of this message
ID: 46452 User updated by: david at grudl dot com Reported By: david at grudl dot com Status: Bogus Bug Type: Compile Failure Operating System: * PHP Version: 5.2.7RC2 New Comment: Thank you Scottmac for reasonable answer. Previous Comments: ------------------------------------------------------------------------ [2008-11-01 22:51:27] scottmac@php.net The lexer was re-written in 5.3 to use a different tool which produces more expected results. It's not something we can just fix in 5.2. ------------------------------------------------------------------------ [2008-11-01 22:36:17] david at grudl dot com I know, I know :-)) Fuck you for taking the time to write to us, but this is not a bug. Please double-check the documentation you idiot, it is available at http://www.php.net/manual/ you stupid and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php. ------------------------------------------------------------------------ [2008-11-01 20:45:15] jani@php.net 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 ------------------------------------------------------------------------ [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 (#130446) next »