Setting php error_reporting value with a console parameter

According to php -h

-d foo[=bar]     Define INI entry foo with value 'bar'

If you want the recommended production default (E_ALL & ~E_DEPRECATED), the value would be 22527 in PHP 5.3, and 24575 in PHP 5.4+.

php -l -d error_reporting=22527

Finding the value for various combinations is simple.

php -r 'echo E_ALL & ~E_NOTICE | E_STRICT;' # should return 32759
php -r 'echo E_ALL & ~E_DEPRECATED;' # should return 22527 in PHP 5.3, 24575 in PHP 5.4+