|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5119 Incorrect reporting of illegal characters in code
Submitted: 2000-06-19 11:52 UTC Modified: 2000-08-17 15:51 UTC
From: webmaster at peda dot net Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.16 OS: Linux 2.2.14-5.0 (RH6.2)
Private report: No CVE-ID: None
 [2000-06-19 11:52 UTC] webmaster at peda dot net
Following code demonstrates the problem. Parser doesn't complain
about illegal (unknown) character in code. Single unknown character doesn't cause error, but two illegal characters causes error. Problem is that if that illegal character is invisible in your editor it may be very very hard to notice. If there is legal code after illegal character it's reported with "Parse error: parse error in FILENAME on line XX". Note that if parser "knows" the character - for example "!" it correctly causes parser error.

PHP build with "/configure '--with-apxs=/usr/sbin/apxs' '--with-mysql=/usr/local/mysql'".

echo("Prepare for compiler error...");
# (step 2) comment the following line to fix malicious code
# comment - there was error I think... parser didn't notice it!
# (step 1) uncomment following to see error
# error doesn't affect following blocks - following works OK


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-17 15:51 UTC]
in php4 you'll get a warning 

PHP Warning:  Use of undefined constant ? - assumed '?' in - on line 9

this should clarify what is going on 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 22:01:30 2023 UTC