static public function isColorsCapable()
    {
        if (self::$colorsCapability === null) {
            if (!static::isUnixPlatform())
                self::$colorsCapability = false;
            else if (!static::isInteractive())
                self::$colorsCapability = false;
            else {
                $tput_presence = static::exec('which tput');
                if (strlen(trim($tput_presence[0])) === 0)
                    self::$colorsCapability = false;
                else {
                    $tput_colors = static::exec('tput colors');
                    self::$colorsCapability = (int)$tput_colors[0] > 0;
                }
            }
        }
        return self::$colorsCapability;
    }
static public function isColorsCapable()
    {
        if (self::$colorsCapability === null) {
            if (!static::isUnixPlatform())
                self::$colorsCapability = false;
            else if (!static::isInteractive())
                self::$colorsCapability = false;
            else {
                $tput_presence = static::exec('which tput');
                if (strlen(trim($tput_presence[0])) === 0)
                    self::$colorsCapability = false;
                else {
                    $tput_colors = static::exec('tput colors');
                    self::$colorsCapability = (int)$tput_colors[0] > 0;
                }
            }
        }
        return self::$colorsCapability;
    }
static public function isColorsCapable ( ) { if ( self :: $ colorsCapability === null ) { if ( ! static :: isUnixPlatform ( ) ) self :: $ colorsCapability = false ; else if ( ! static :: isInteractive ( ) ) self :: $ colorsCapability = false ; else { $ tput_presence = static :: exec ( 'which tput' ) ; if ( strlen ( trim ( $ tput_presence [ 0 ] ) ) === 0 ) self :: $ colorsCapability = false ; else { $ tput_colors = static :: exec ( 'tput colors' ) ; self :: $ colorsCapability = ( int ) $ tput_colors [ 0 ] > 0 ; } } } return self :: $ colorsCapability ; }
Checks that terminal supports colors
@return bool
Checks that terminal supports colors