PHPackages                             fleshgrinder/exit-codes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. fleshgrinder/exit-codes

AbandonedArchivedLibrary[CLI &amp; Console](/categories/cli)

fleshgrinder/exit-codes
=======================

Library providing constants for common CLI exit codes.

1.0.0(9y ago)266UnlicensePHPPHP &gt;=5.3

Since Aug 11Pushed 9y agoCompare

[ Source](https://github.com/Fleshgrinder/php-exit-codes)[ Packagist](https://packagist.org/packages/fleshgrinder/exit-codes)[ Docs](https://github.com/Fleshgrinder/php-exit-codes)[ RSS](/packages/fleshgrinder-exit-codes/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP Exit Codes
==============

[](#php-exit-codes)

Commonly used exit codes for usage in console applications and commands.

Using appropriate exit codes greatly helps users of your project or library to include them in their own scripting and take appropriate decisions based on the returned code. Simply always using the catch-all exit code *1*, as is most common, does not help the user in any way unless there is only a single source of error in the complete script; which is very unlikely.

Installation
------------

[](#installation)

Open a terminal, enter your project directory and execute the following command to add this package to your dependencies:

```
$ composer require fleshgrinder/exit-codes

```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

Usage
-----

[](#usage)

The constants are automatically loaded if you include the Composer provided auto-loader in your script.

```
