My guess is that your error reporting value is using the default E_ALL & ~E_NOTICE.
simon$ php -d error_reporting=2147483647 -a Interactive shell php > djkfhlasdkjfhasdlkjfha; PHP Notice: Use of undefined constant djkfhlasdkjfhasdlkjfha - assumed 'djkfhlasdkjfhasdlkjfha' in php shell code on line 1 Notice: Use of undefined constant djkfhlasdkjfhasdlkjfha - assumed 'djkfhlasdkjfhasdlkjfha' in php shell code on line 1 php > %#$@^*$#&%^#$&*^%$#*; php > thisFunctionDoesntExist(); PHP Parse error: syntax error, unexpected '%' in php shell code on line 1 Parse error: syntax error, unexpected '%' in php shell code on line 1 php > The value of 2147483647 includes every error flag On 20/10/2011, at 10:46 AM, Bob Brown 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] --- Simon Welsh Admin of http://simon.geek.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]
