PHP Sadness

(<7.0) Fails to produce errors on bad octal

This is fixed as of PHP 7.0. It now produces Parse error: Invalid numeric literal... instead.

Prior to PHP 7, no errors were produced on bad octal literals:

$ perl -le 'print 07'
$ perl -le 'print 08'
Illegal octal digit '8' at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
$ python -c 'print 07' 
$ python -c 'print 08'
  File "", line 1
    print 08
SyntaxError: invalid token
$ php -r 'print 07;'    

$ php -r 'print 08;'

$ php -r 'print 018;'

$ php -r 'print 0128;'

Significance: Fast Debugging

It is very important to be able to quickly debug issues in your application. When every second of downtime costs your company money, bad error messages can mean thousands of dollars in unnecessary losses and hours of wasted developer time. Languages posing to be used in large applications need to ensure that developers can quickly discern the cause of an issue.