public static function size($path)
    {
        $path = ltrim(self::fullpath($path), '/');

        $ch = curl_init('file://' . $path);

        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HEADER, true);
        curl_setopt($ch, CURLOPT_NOBODY, true);

        $headers = curl_exec($ch);
        curl_close($ch);

        $ch = null;

        if (preg_match('#content-length:(\s+?|)(\d+)#i', $headers, $matches)) {
            return $matches[2];
        }

        return false;
    }
public static function size($path)
    {
        $path = ltrim(self::fullpath($path), '/');

        $ch = curl_init('file://' . $path);

        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HEADER, true);
        curl_setopt($ch, CURLOPT_NOBODY, true);

        $headers = curl_exec($ch);
        curl_close($ch);

        $ch = null;

        if (preg_match('#content-length:(\s+?|)(\d+)#i', $headers, $matches)) {
            return $matches[2];
        }

        return false;
    }
public static function size ( $ path ) { $ path = ltrim ( self :: fullpath ( $ path ) , '/' ) ; $ ch = curl_init ( 'file://' . $ path ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_HEADER , true ) ; curl_setopt ( $ ch , CURLOPT_NOBODY , true ) ; $ headers = curl_exec ( $ ch ) ; curl_close ( $ ch ) ; $ ch = null ; if ( preg_match ( '#content-length:(\s+?|)(\d+)#i' , $ headers , $ matches ) ) { return $ matches [ 2 ] ; } return false ; }
Get file size, support for read files with more of 2GB in 32bit.
Return `false` if file is not found

@param string $path
@throws \Inphinit\Experimental\Exception
@return string|bool
Get file size support for read files with more of 2GB in 32bit . Return false if file is not found