# RFC: CLI options for strict and quiet modes

- Status: Inactive
- Authors: Adam Harvey aharvey@php.net
- Date: 2011-07-06
- Version: 1.1
- Original: https://wiki.php.net/rfc/cli-strict
- Page: https://externals.io/rfc/cli-strict
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

## Discussions on the mailing list

- [\[RFC\] -W option for CLI "strict mode"](https://externals.io/message/53745.md) — started on 2011-07-05, 18 messages

---

## Introduction

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.

## Why?

- 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.

## Patches

- v1.1 patch (`-W` and `-Q`): <http://www.adamharvey.name/patches/php-cli-strict-quiet.patch.txt>
- v1.0 patch (`-W` only): <http://www.adamharvey.name/patches/php-cli-strict.patch.txt>

## Changelog

- 2011-07-06: Add a `-Q` option in response to IRC and mailing list feedback.
- 2011-07-05: Initial proposal.
