erik-nystrom/php-clio
A Super simple PHP Command Line IO class
Maintainers
dev-master
2020-05-20 14:30 UTC
Requires
- php: >=5.3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 99faa283b6688a5f73f504d12818a37a8eea0c6a
- Erik Nystrom <erik.s.nystrom.woop@gmail.com>
This package is auto-updated.
Last update: 2026-06-21 03:50:19 UTC
README
A basic class to help facilitate command line IO in your PHP scripts.
Why did I make this?
For command line PHP applications that require some degree of input, this has served me well.
Usage
Install via Composer:
composer require erik-nystrom/php-clio
Alias/Import into your script:
use PHPClio\Console as Console;
Output text to the console:
Console::out("Here's some sample text");
Get user input from the console:
$input = Console::in("Enter some text");
Get user input from the console, with restrictions:
$input = Console::in("Enter some text", ["ValidInput1", "ValidInput2", "ValidInput3"]);
