php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30776 unreadable answer from parser
Submitted: 2004-11-13 20:53 UTC Modified: 2004-11-13 22:21 UTC
From: rob at alterlinks dot fr Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.0.2 OS: Linux 2.6.3-7
Private report: No CVE-ID: None
 [2004-11-13 20:53 UTC] rob at alterlinks dot fr
Description:
------------
Please see bug #28243

I know, as reported, it is maybe *not* a bug, one has to use the correct syntax !

But, when using

<?

unset (variable)

?>

the parser result : expecting T_PAAMAYIM_NEKUDOTAYIM 

is not understandable, at least not to me.
PHP4 returns an understandble code.

Reproduce code:
---------------
<?

unset (variable);

?>

(indeed, the above code is *incorrect*, it's only to provoque de parser's return code)

Expected result:
----------------
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /var/www/sites/premiere/phpinfo.php on line 2

Actual result:
--------------
Parse error: parse error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /var/www/sites/bios/phpinfo.php on line 2


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-13 21:16 UTC] tony2001@php.net
I can't reproduce it.
But I'd advise you to read this: http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
 [2004-11-13 21:36 UTC] rob at alterlinks dot fr
Thanks for your reply.

However, can you explain why PHP4 reports a readable error, in relation to 
the misstake I'm maken, as where PHP5 reports me something in Hebrew while 
the error I'm making seems to have nothing to do with classes ??

What is the error it reports you for the code below ?

<?
unset (value);
?>
 [2004-11-13 21:40 UTC] tony2001@php.net
It reports exactly what you have expected: "Parse error: parse error, unexpected T_VAR, expecting T_STRING or T_VARIABLE or '$' in .."
 [2004-11-13 21:50 UTC] rob at alterlinks dot fr
I'm happy for you, for me it doesn't with PHP 5.0.2.
It does with PHP4, not with PHP5.0.2 (the exact same code).
Either it's fixed in whatever version you're using, either I can't conclude otherwise than that there is a difference in behaviour between my PHP4 and PHP5.0.2
Anyway, lets forget about it, it's not that big of a deal, I guess I'll just have to go learn Hebrew ;)
 [2004-11-13 21:53 UTC] tony2001@php.net
No bug -> bogus.
 [2004-11-13 22:21 UTC] rob at alterlinks dot fr
Good evening,

I don't like the status "bogus"; It's maybe not a bug, at least nothing to be really worried about, but if I wouldn't see the result with my own eyes on my screen, I wonder how one can say that there is *no* bug.
Would I be able to dream and come up with a word like that ?  lol

Please see :

http://bios.alterlinks.fr/phpinfo.php
http://bios.alterlinks.fr/phpinfo2.php

and

http://premiere.alterlinks.fr/phpinfo.php
http://premiere.alterlinks.fr/phpinfo2.php


between phpinfo and phpinfo2 the only difference is the line :
unset (variable);

which has been added.

Anyway, just leave the incident closed as it's no big deal, just to show you that I'm not dreaming :)

Best regards,
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 23:01:26 2024 UTC