public static function getWindowSize ( ) {
        $terminal = exec('echo $TERM_PROGRAM');
        if ( $terminal === 'Apple_Terminal' ) {
            $windowWidth = exec('tput cols');
            $windowHeight = exec('tput lines');
        }
        $windowWidth = ( $windowWidth > 0 ) ? $windowWidth : self::DEFAULT_WINDOW_WIDTH;
        $windowHeight = ( $windowHeight > 0 ) ? $windowHeight : self::DEFAULT_WINDOW_HEIGHT;
        return array($windowWidth, $windowHeight);
    }
public static function getWindowSize ( ) {
        $terminal = exec('echo $TERM_PROGRAM');
        if ( $terminal === 'Apple_Terminal' ) {
            $windowWidth = exec('tput cols');
            $windowHeight = exec('tput lines');
        }
        $windowWidth = ( $windowWidth > 0 ) ? $windowWidth : self::DEFAULT_WINDOW_WIDTH;
        $windowHeight = ( $windowHeight > 0 ) ? $windowHeight : self::DEFAULT_WINDOW_HEIGHT;
        return array($windowWidth, $windowHeight);
    }
public static function getWindowSize ( ) { $ terminal = exec ( 'echo $TERM_PROGRAM' ) ; if ( $ terminal === 'Apple_Terminal' ) { $ windowWidth = exec ( 'tput cols' ) ; $ windowHeight = exec ( 'tput lines' ) ; } $ windowWidth = ( $ windowWidth > 0 ) ? $ windowWidth : self :: DEFAULT_WINDOW_WIDTH ; $ windowHeight = ( $ windowHeight > 0 ) ? $ windowHeight : self :: DEFAULT_WINDOW_HEIGHT ; return array ( $ windowWidth , $ windowHeight ) ; }
Get terminal window size

@return array (width, height)
Get terminal window size