public static function parseSize($size)
    {
        $height = null;
        $width = null;

        if (count((array) $size) == 2 || strpos($size, 'x')) {
            list($width, $height) = is_array($size) ? $size : explode('x', $size);
        } else {
            $size = (array) $size;
            $width = (int) $size[0];
        }

        return array($width,$height);
    }
public static function parseSize($size)
    {
        $height = null;
        $width = null;

        if (count((array) $size) == 2 || strpos($size, 'x')) {
            list($width, $height) = is_array($size) ? $size : explode('x', $size);
        } else {
            $size = (array) $size;
            $width = (int) $size[0];
        }

        return array($width,$height);
    }
public static function parseSize ( $ size ) { $ height = null ; $ width = null ; if ( count ( ( array ) $ size ) == 2 || strpos ( $ size , 'x' ) ) { list ( $ width , $ height ) = is_array ( $ size ) ? $ size : explode ( 'x' , $ size ) ; } else { $ size = ( array ) $ size ; $ width = ( int ) $ size [ 0 ] ; } return array ( $ width , $ height ) ; }
Parses a string based size convention to width and height.

@param string|array $size

@return array
Parses a string based size convention to width and height .