erik-nystrom/php-clio

A Super simple PHP Command Line IO class

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/erik-nystrom/php-clio

dev-master 2020-05-20 14:30 UTC

This package is auto-updated.

Last update: 2025-09-21 01:58:30 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"]);

License

MIT