public static function getScreenHeight() {

        // set a simple error handler that indicates the exec function was disabled
        set_error_handler("self::errorHandler", E_WARNING);

        // initialize the array for the output of the execute
        $output = [];

        // execute the bash command tput cols to determine the screen width
        $height = exec("tput lines 2>&1", $output);

        // if the height is zero, then something went wrong
        if ($height == 0 || $height == "" || is_null($height)) {

            // use the error handler to raise the exception
            self::errorHandler(null,null );

        }


        // put back the error handler
        restore_error_handler();

        // return the width
        return intval($height);



    }
public static function getScreenHeight() {

        // set a simple error handler that indicates the exec function was disabled
        set_error_handler("self::errorHandler", E_WARNING);

        // initialize the array for the output of the execute
        $output = [];

        // execute the bash command tput cols to determine the screen width
        $height = exec("tput lines 2>&1", $output);

        // if the height is zero, then something went wrong
        if ($height == 0 || $height == "" || is_null($height)) {

            // use the error handler to raise the exception
            self::errorHandler(null,null );

        }


        // put back the error handler
        restore_error_handler();

        // return the width
        return intval($height);



    }
public static function getScreenHeight ( ) { // set a simple error handler that indicates the exec function was disabled set_error_handler ( "self::errorHandler" , E_WARNING ) ; // initialize the array for the output of the execute $ output = [ ] ; // execute the bash command tput cols to determine the screen width $ height = exec ( "tput lines 2>&1" , $ output ) ; // if the height is zero, then something went wrong if ( $ height == 0 || $ height == "" || is_null ( $ height ) ) { // use the error handler to raise the exception self :: errorHandler ( null , null ) ; } // put back the error handler restore_error_handler ( ) ; // return the width return intval ( $ height ) ; }
Get the current screen height

@uses errorHandler
@return int - the number of lines it holds
@throws RuntimeException
Get the current screen height