Check you error reporting setting. PHP will think "djkfhlasdkjfhasdlkjfha" is a constant, and when it cant find it will automatically convert it to a string;
If you did: "djkfhlasdkjfhasdlkjfha"; it does not cause an error (or have any effect). use error_reporting(E_ALL & E_NOTICE); to catch undefined constant errors. David Neilsen | 07 834 3366 | PANmedia ® On Thu, Oct 20, 2011 at 10:46 AM, Bob Brown <[email protected]> wrote: > Hi All, > > A chocolate fish for whoever can explain this - why when I type crap > into the PHP CLI prompt does it not throw errors? For the record, it's > PHP 5.3.3-1ubuntu9.6 with Suhosin-Patch (cli) (built: Oct 14 2011 > 22:31:56). > > bob@desktop:~$ php -a > Interactive shell > > php > djkfhlasdkjfhasdlkjfha; > php > %#$@^*$#&%^#$&*^%$#*; > php > thisFunctionDoesntExist(); > PHP Parse error: syntax error, unexpected '%' in php shell code on line 1 > php > > > bob@desktop:~$ > > I noticed this because I was "flapping" into a PHP file to see if I > had found the right file, e.g ... > > <?php > // Some code here... > > sadlkfjhsalkdfjh // my flap (expecting an error) > ?> > > Cheers, > > - Bob - > > -- > Bob Brown, [L|W]AMP Web Developer > [email protected], http://www.guru.net.nz > > -- > NZ PHP Users Group: http://groups.google.com/group/nzphpug > To post, send email to [email protected] > To unsubscribe, send email to > [email protected] > -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
