private static function getAnsiCon()
    {
        if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
            // extract [w, H] from "wxh (WxH)"
            // or [w, h] from "wxh"
            return [
                (int) $matches[1],
                isset($matches[4]) ? (int) $matches[4] : (int) $matches[2],
            ];
        }

        return [];
    }
private static function getAnsiCon()
    {
        if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
            // extract [w, H] from "wxh (WxH)"
            // or [w, h] from "wxh"
            return [
                (int) $matches[1],
                isset($matches[4]) ? (int) $matches[4] : (int) $matches[2],
            ];
        }

        return [];
    }
private static function getAnsiCon ( ) { if ( preg_match ( '/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/' , trim ( getenv ( 'ANSICON' ) ) , $ matches ) ) { // extract [w, H] from "wxh (WxH)" // or [w, h] from "wxh" return [ ( int ) $ matches [ 1 ] , isset ( $ matches [ 4 ] ) ? ( int ) $ matches [ 4 ] : ( int ) $ matches [ 2 ] , ] ; } return [ ] ; }
Parse width & height from ANSICON env var.

@return int[]
Parse width & height from ANSICON env var .