protected function getValueType($value)
    {
        switch (true) {
            case is_scalar($value):
                $type = gettype($value);
                break;

            case is_array($value):
                $type = 'array';
                break;

            case is_object($value):
                $type = get_class($value);
                break;

            case is_resource($value):
                $type = 'resource';
                break;

            default:
                $type = 'unknown';
                break;
        }

        return $type;
    }
protected function getValueType($value)
    {
        switch (true) {
            case is_scalar($value):
                $type = gettype($value);
                break;

            case is_array($value):
                $type = 'array';
                break;

            case is_object($value):
                $type = get_class($value);
                break;

            case is_resource($value):
                $type = 'resource';
                break;

            default:
                $type = 'unknown';
                break;
        }

        return $type;
    }
protected function getValueType ( $ value ) { switch ( true ) { case is_scalar ( $ value ) : $ type = gettype ( $ value ) ; break ; case is_array ( $ value ) : $ type = 'array' ; break ; case is_object ( $ value ) : $ type = get_class ( $ value ) ; break ; case is_resource ( $ value ) : $ type = 'resource' ; break ; default : $ type = 'unknown' ; break ; } return $ type ; }
Returns the type of a value

@param mixed $value

@return string
Returns the type of a value