Basically, I wish to have 3 printers to print in error state, success state or info state which means nothing but different colors.     class ColorCode{        private static $options = [            dark_gray     => 1;30,            light_gray    => 0;37,            blue          => 0;34,            green         => 0;32,            cyan          => 0;36,            red           => 0;31,            yellow        => 1;33        ];        public static function get($key){            if(isset(self::$options[$key])){                return self::$options[$key];            } else {                return '';            }        }    }    class ColorPrint {        public $color = '';        function __construct($color) {            $this->color = ColorCode::get($color);        }        public function printc($msg) {            echo \033[. $this->color .m.$msg.\033[0m\n;        }    }    $out = [        'error'     => new ColorPrint('red'),        'info'      => new ColorPrint('cyan'),        'success'   => new ColorPrint('green'),    ];    $out['error']->printc('Invalid Option');
Printing to terminal in a color
php;console