public static function describeType($input)
    {
        switch (gettype($input)) {
            case 'object':
                return 'object(' . get_class($input) . ')';
            case 'array':
                return 'array(' . count($input) . ')';
            default:
                ob_start();
                var_dump($input);
                // normalize float vs double
                return str_replace('double(', 'float(', rtrim(ob_get_clean()));
        }
    }
public static function describeType($input)
    {
        switch (gettype($input)) {
            case 'object':
                return 'object(' . get_class($input) . ')';
            case 'array':
                return 'array(' . count($input) . ')';
            default:
                ob_start();
                var_dump($input);
                // normalize float vs double
                return str_replace('double(', 'float(', rtrim(ob_get_clean()));
        }
    }
public static function describeType ( $ input ) { switch ( gettype ( $ input ) ) { case 'object' : return 'object(' . get_class ( $ input ) . ')' ; case 'array' : return 'array(' . count ( $ input ) . ')' ; default : ob_start ( ) ; var_dump ( $ input ) ; // normalize float vs double return str_replace ( 'double(' , 'float(' , rtrim ( ob_get_clean ( ) ) ) ; } }
Debug function used to describe the provided value type and class.

@param mixed $input

@return string Returns a string containing the type of the variable and
if a class is provided, the class name.
Debug function used to describe the provided value type and class .