|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-17 15:51 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 21:00:02 2025 UTC |
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"); ?>