Request for Comments: CLI options for strict and quiet modes


This RFC seeks to add options to the CLI SAPI that would enable all and no error display.

Proposed Options

The proposed option to display all errors would be -W, with --strict as the long form option. No argument would be accepted; this is a purely boolean option.

Similarly, the option to hide all errors would be -Q, with --quiet as the long form option.


  • This makes debugging command line code easier, by providing a single option that can be turned on to make PHP maximally noisy.
  • Other languages have equivalents: Perl has -w (which doesn't enable use strict, although I suspect most Perl users wish it did). Ruby also has -w.

Why not?

  • Uses up another two letters for something that's equivalent to php -d display_errors=1 -d error_reporting=-1 and php -d display_errors=0 -d error_reporting=0, respectively.



  • 2011-07-06: Add a -Q option in response to IRC and mailing list feedback.
  • 2011-07-05: Initial proposal.
rfc/cli-strict.txt · Last modified: 2017/09/22 13:28 by