Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

wujunze/php-cli-color

Repository files navigation

php-cli-color

Simple and easy to use the PHP command-line output of color

Build Status codecov Latest Stable Version Total Downloads License

Installation

composer require wujunze/php-cli-color

How to use

<?php
require_once __DIR__ . './../vendor/autoload.php';
$colors = new Wujunze\Colors();
// Test some basic printing with Colors class
echo $colors->getColoredString("Testing Colors class, this is purple string on yellow background.", "purple", "yellow");
echo $colors->getColoredString("Testing Colors class, this is blue string on light gray background.", "blue", "light_gray");
echo $colors->getColoredString("Testing Colors class, this is red string on black background.", "red", "black");
echo $colors->getColoredString("Testing Colors class, this is cyan string on green background.", "cyan", "green");
echo $colors->getColoredString("Testing Colors class, this is cyan string on default background.", "cyan");
echo $colors->getColoredString("Testing Colors class, this is default string on cyan background.", null, "cyan");

run result

code run result

About

Simple and easy to use the PHP command-line output of color

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

Languages

AltStyle によって変換されたページ (->オリジナル) /