Bug #5119: Incorrect reporting of illegal characters in code

From: Date: Mon, 19 Jun 2000 09:52:28 +0000
Subject: Bug #5119: Incorrect reporting of illegal characters in code
Groups: php.dev 
Request: Send a blank email to php-dev+get-21711@lists.php.net to get a copy of this message
From: webmaster@peda.net Operating system: Linux 2.2.14-5.0 (RH6.2) PHP version: 3.0.16 PHP Bug Type: Parser error Bug description: Incorrect reporting of illegal characters in code 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'".  <?php 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 #echo("oops!"); ?> <?php # error doesn't affect following blocks - following works OK echo("NOT"); ?>

« previous php.dev (#21711) next »