public function getVarForDisplay()
    {

        if( is_object( $this->var ) ) {
            $output = "object ". get_class( $this->var );
        } elseif( is_string( $this->var ) or is_array( $this->var ) ) {
            $type = is_string( $this->var ) ? 'string' : 'array';
            $working = json_encode($this->var);
            $length = strlen( $working );
            if( $length > 50 ) {
                $output = sprintf(
                    "%s %s ... %s chars ommited",
                    $type,
                    substr( $working, 0, 40 ),
                    $length - 40
                );
            } else {
                $output = "{$type} {$working}";
            }
        } elseif( is_null( $this->var ) ) {
            $output = "NULL";
        } elseif( is_bool( $this->var ) ) {
            $output = $this->var ? "TRUE" : "FALSE";
        } elseif( is_int( $this->var ) ) {
            $output = "int {$this->var}";
        } elseif( is_float( $this->var ) ) {
            $output = "float {$this->var}";
        } elseif( is_resource( $this->var ) ) {
            $output = "resource `" .get_resource_type( $this->var ) . "`";
        } else {
            $output = print_r( $this->var, true );
        }

        return $output;

    }
public function getVarForDisplay()
    {

        if( is_object( $this->var ) ) {
            $output = "object ". get_class( $this->var );
        } elseif( is_string( $this->var ) or is_array( $this->var ) ) {
            $type = is_string( $this->var ) ? 'string' : 'array';
            $working = json_encode($this->var);
            $length = strlen( $working );
            if( $length > 50 ) {
                $output = sprintf(
                    "%s %s ... %s chars ommited",
                    $type,
                    substr( $working, 0, 40 ),
                    $length - 40
                );
            } else {
                $output = "{$type} {$working}";
            }
        } elseif( is_null( $this->var ) ) {
            $output = "NULL";
        } elseif( is_bool( $this->var ) ) {
            $output = $this->var ? "TRUE" : "FALSE";
        } elseif( is_int( $this->var ) ) {
            $output = "int {$this->var}";
        } elseif( is_float( $this->var ) ) {
            $output = "float {$this->var}";
        } elseif( is_resource( $this->var ) ) {
            $output = "resource `" .get_resource_type( $this->var ) . "`";
        } else {
            $output = print_r( $this->var, true );
        }

        return $output;

    }
public function getVarForDisplay ( ) { if ( is_object ( $ this -> var ) ) { $ output = "object " . get_class ( $ this -> var ) ; } elseif ( is_string ( $ this -> var ) or is_array ( $ this -> var ) ) { $ type = is_string ( $ this -> var ) ? 'string' : 'array' ; $ working = json_encode ( $ this -> var ) ; $ length = strlen ( $ working ) ; if ( $ length > 50 ) { $ output = sprintf ( "%s %s ... %s chars ommited" , $ type , substr ( $ working , 0 , 40 ) , $ length - 40 ) ; } else { $ output = "{$type} {$working}" ; } } elseif ( is_null ( $ this -> var ) ) { $ output = "NULL" ; } elseif ( is_bool ( $ this -> var ) ) { $ output = $ this -> var ? "TRUE" : "FALSE" ; } elseif ( is_int ( $ this -> var ) ) { $ output = "int {$this->var}" ; } elseif ( is_float ( $ this -> var ) ) { $ output = "float {$this->var}" ; } elseif ( is_resource ( $ this -> var ) ) { $ output = "resource `" . get_resource_type ( $ this -> var ) . "`" ; } else { $ output = print_r ( $ this -> var , true ) ; } return $ output ; }
Get a human readable representation of the passed varibale
@return string
Get a human readable representation of the passed varibale