Download the PHP package ckoumpis/php-prompt without Composer
On this page you can find all versions of the php package ckoumpis/php-prompt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ckoumpis/php-prompt
More information about ckoumpis/php-prompt
Files in ckoumpis/php-prompt
Package php-prompt
Short Description A PHP console utility package providing spinners, progress bars, and error handling for better command-line user experience.
License MIT
Informations about the package php-prompt
php-prompt
A PHP console utility package that provides spinners, progress bars, and color-coded console messages for better command-line user experience.
Installation
To install the PhpPrompt, you need to have Composer installed.
Usage
Console
The Console
class provides several methods to output colored messages.
List of available colors
- White: For simple logs (white)
- Success: For success messages (green)
- Error: For error messages (red)
- Warning: For warning messages (yellow)
- Blue: For information messages (blue)
- Magenta: For important messages (magenta)
- Cyan: For notifications (cyan)
- Debug: For debugging (grey)
- Notice: For notifications (cyan)
Progress Bar
The ProgressBar
class allows you to visually display the progress of a task. You can use it with 2 ways.
-
Basic way.
- Using
withSteps
method
Spinner
The Spinner
class provides a simple loading animation for console, useful for indicating that an operation is in progress.You can use Spinner bar with 2 ways.
-
Basic way
- Using
withSteps
method. Or withSteps method
MemoryUsage
The MemoryUsage
class tracks Memory consumption for executed functions.
Usage:
Contributing
We welcome contributions! If you find a bug or have a feature request, please open an issue or submit a pull request on Github.