3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ERROR); $resolution[22]='720_mp4'; $resolution[18]='360_mp4'; $resolution[43]='360_webm'; $resolution[5]='240p_flv'; $resolution[36]='240p_3gp'; $resolution[17]='114p_3gp'; $data = getpage($_GET['url']); //$data = file_get_contents($_GET['url']); preg_match('/ytplayer.config = {(.*?)};/',$data,$match); //debug($match); $o = json_decode('{'.$match[1].'}') ; $links = explode(',',$o -> args -> url_encoded_fmt_stream_map); //print_r ($links); foreach($links as $link) { parse_str($link,$r); //echo $link." - ".$r."<br />"; print_r ($r); //debug($r); /* if ($r['s']) { echo ('<a href="/domain.com/play.php?token='. urlencode($r['url']."&signature=".decrypt_sig($r['s'],'fr_FR-vflmo6Hkk/html5player')).'&fn=video.mp4">quality: '.$resolution[$r['itag']].'</a><br />'); } else { //$linkr = preg_replace("/googlevideo.com/","c.docs.google.com",$r['url']); //$link = preg_replace("/http:/","https:",$linkr); echo '<a href="'.$r['url'].'">quality: '.$resolution[$r['itag']].'</a><br />'; } */ //echo '<div>'.$r['s'].'</div>'; } function decrypt_sig($s,$player_id) { /* Methods / Commands for decrypting sig. - r = reverse the string; - sN = slice from character N to the end; - wN = swap 0th and Nth character. */ $algo = array( 'fr_FR-vflmo6Hkk/html5player' => 'w8 s3 w45 w46 s2 w29 w25 w56 w2', // 26 sep 2014, ); $method = explode(" ",$algo[$player_id]); foreach($method as $m) { if($m == 'r') $s = strrev($s); else if( substr($m,0,1) == 's') $s = substr($s, (int) substr($m,1) ); else if( substr($m,0,1) == 'w') $s = swap($s, (int) substr($m,1)); //echo $m." - ".$s."<br />"; } return $s; } function swap($a, $b) { $c = $a[0]; $a[0] = $a[$b]; $a[$b] = $c; return $a; } function getpage($url) { // fetch data $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); $data = curl_exec($curl); curl_close($curl); return $data; } function debug($str) { if(is_array($str) || is_object($str)) { print '<pre>'; print_r($str); print '</pre>'; } else echo $str; } //echo '<div>'.htmlspecialchars($data).'</div>'; ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0150.00718.81
8.3.50.0130.00821.91
8.3.40.0150.00018.82
8.3.30.0140.00319.22
8.3.20.0040.00420.13
8.3.10.0080.00020.51
8.3.00.0070.00717.89
8.2.180.0080.00817.00
8.2.170.0070.01022.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0070.00022.15
8.2.110.0100.00020.43
8.2.100.0080.00318.09
8.2.90.0080.00019.40
8.2.80.0040.00417.97
8.2.70.0030.00617.38
8.2.60.0000.00917.93
8.2.50.0060.00318.07
8.2.40.0000.00818.18
8.2.30.0030.00519.30
8.2.20.0060.00317.77
8.2.10.0030.00618.09
8.2.00.0040.00417.87
8.1.280.0040.01125.92
8.1.270.0040.00423.88
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.75
8.1.230.0070.00419.02
8.1.220.0060.00317.78
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0030.00517.38
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0050.00222.05
8.1.150.0050.00318.96
8.1.140.0040.00417.49
8.1.130.0000.00717.86
8.1.120.0050.00317.34
8.1.110.0040.00417.46
8.1.100.0040.00417.38
8.1.90.0040.00417.38
8.1.80.0000.00717.42
8.1.70.0030.00317.44
8.1.60.0000.00817.52
8.1.50.0060.00317.50
8.1.40.0040.00417.46
8.1.30.0000.00817.65
8.1.20.0000.00817.61
8.1.10.0040.00417.62
8.1.00.0020.00517.59
8.0.300.0040.00418.77
8.0.290.0000.01016.88
8.0.280.0030.00318.48
8.0.270.0030.00317.34
8.0.260.0040.00417.31
8.0.250.0000.00717.03
8.0.240.0030.00316.95
8.0.230.0070.00016.93
8.0.220.0050.00216.91
8.0.210.0070.00017.05
8.0.200.0030.00317.10
8.0.190.0050.00316.93
8.0.180.0040.00417.00
8.0.170.0080.00016.98
8.0.160.0040.00416.93
8.0.150.0000.00716.86
8.0.140.0030.00516.91
8.0.130.0030.00313.39
8.0.120.0000.00816.92
8.0.110.0050.00216.99
8.0.100.0040.00416.96
8.0.90.0040.00416.90
8.0.80.0150.00616.97
8.0.70.0000.00816.99
8.0.60.0070.00016.81
8.0.50.0030.00516.98
8.0.30.0080.01117.21
8.0.20.0080.01117.40
8.0.10.0070.00017.20
8.0.00.0130.00716.98
7.4.330.0000.00515.05
7.4.320.0060.00016.64
7.4.300.0000.00616.47
7.4.290.0070.00016.62
7.4.280.0000.00716.52
7.4.270.0030.00316.57
7.4.260.0000.00816.55
7.4.250.0000.00716.50
7.4.240.0040.00416.57
7.4.230.0000.00716.38
7.4.220.0070.01116.58
7.4.210.0030.01016.61
7.4.200.0030.00316.54
7.4.150.0130.01017.40
7.4.140.0080.01317.86
7.4.130.0120.00616.58
7.4.120.0080.01016.45
7.4.110.0100.00716.61
7.4.100.0110.00616.59
7.4.90.0070.01016.54
7.4.80.0090.00916.48
7.4.70.0060.00916.53
7.4.60.0070.01116.75
7.4.50.0030.00316.40
7.4.40.0030.01416.74
7.4.30.0030.01216.59
7.4.10.0070.01015.22
7.4.00.0090.00715.06
7.3.330.0000.00513.26
7.3.320.0020.00213.40
7.3.310.0050.00216.38
7.3.300.0040.00416.36
7.3.290.0110.00616.38
7.3.280.0110.00816.37
7.3.270.0120.00917.40
7.3.260.0030.01316.57
7.3.250.0040.01216.45
7.3.240.0060.01516.33
7.3.230.0150.01016.39
7.3.210.0100.00716.61
7.3.200.0030.01419.39
7.3.190.0130.00616.52
7.3.180.0030.01516.51
7.3.170.0100.00716.42
7.3.160.0080.00816.52
7.3.130.0070.01014.87
7.3.120.0090.00914.75
7.3.110.0090.00914.85
7.3.100.0030.01014.87
7.3.90.0040.00814.84
7.3.80.0030.00914.49
7.3.70.0030.01015.04
7.3.60.0030.01214.93
7.3.50.0070.00714.89
7.3.40.0040.01114.68
7.3.30.0000.01414.92
7.3.20.0120.00316.75
7.3.10.0120.00316.68
7.3.00.0090.00416.62
7.2.330.0070.01316.82
7.2.320.0030.01416.66
7.2.310.0060.00916.33
7.2.300.0160.00616.67
7.2.290.0080.00816.57
7.2.260.0100.01015.16
7.2.250.0030.01714.97
7.2.240.0070.01115.17
7.2.230.0080.00415.01
7.2.220.0060.00915.33
7.2.210.0040.01114.93
7.2.200.0060.00915.08
7.2.190.0060.00615.09
7.2.180.0040.01115.10
7.2.170.0060.01014.87
7.2.160.0030.00715.16
7.2.150.0060.00316.65
7.2.140.0060.00916.89
7.2.130.0060.01016.74
7.2.120.0100.00816.75
7.2.110.0070.00816.72
7.2.100.0070.00816.82
7.2.90.0070.01016.94
7.2.80.0050.00917.05
7.2.70.0070.00816.76
7.2.60.0090.00816.85
7.2.50.0080.00816.74
7.2.40.0050.01016.86
7.2.30.0080.00816.92
7.2.20.0050.01016.78
7.2.10.0050.00816.83
7.2.00.0070.00917.45
7.1.330.0060.00915.68
7.1.320.0100.00315.98
7.1.310.0070.00715.80
7.1.300.0060.00915.85
7.1.290.0040.01115.67
7.1.280.0100.00715.82
7.1.270.0090.00615.69
7.1.260.0140.00015.67
7.1.250.0100.00615.79
7.1.240.0080.00915.78
7.1.230.0090.00615.77
7.1.220.0070.00815.69
7.1.210.0120.00215.72
7.1.200.0110.00315.59
7.1.190.0060.01215.63
7.1.180.0080.00815.68
7.1.170.0080.00615.80
7.1.160.0110.00415.63
7.1.150.0120.00715.79
7.1.140.0080.00815.67
7.1.130.0080.00915.80
7.1.120.0110.00615.78
7.1.110.0060.00915.82
7.1.100.0080.00616.48
7.1.90.0130.00415.76
7.1.80.0120.00915.63
7.1.70.0050.00616.19
7.1.60.0100.00916.97
7.1.50.0060.01216.22
7.1.40.0100.00315.65
7.1.30.0090.00615.52
7.1.20.0080.00815.49
7.1.10.0100.00715.65
7.1.00.0080.02517.93
7.0.330.0060.01215.22
7.0.320.0050.00815.31
7.0.310.0040.01115.18
7.0.300.0100.00615.22
7.0.290.0080.00815.29
7.0.280.0080.00815.17
7.0.270.0060.01115.21
7.0.260.0110.00915.23
7.0.250.0050.01215.31
7.0.240.0090.00815.37
7.0.230.0100.00715.41
7.0.220.0070.01015.47
7.0.210.0090.00515.21
7.0.200.0050.00615.73
7.0.190.0090.00315.16
7.0.180.0050.00915.28
7.0.170.0120.00315.29
7.0.160.0080.00515.16
7.0.150.0070.01115.30
7.0.140.0050.02917.55
7.0.130.0090.00315.42
7.0.120.0070.01015.08
7.0.110.0090.00715.29
7.0.100.0080.00815.37
7.0.90.0070.00715.28
7.0.80.0100.01816.77
7.0.70.0120.03116.91
7.0.60.0060.03716.80
7.0.50.0060.03317.06
7.0.40.0090.03015.63
7.0.30.0020.02215.51
7.0.20.0070.03115.53
7.0.10.0090.03315.52
7.0.00.0090.03115.64
5.6.400.0030.01014.09
5.6.390.0100.00313.92
5.6.380.0090.00514.31
5.6.370.0030.01314.37
5.6.360.0040.00614.34
5.6.350.0030.01314.40
5.6.340.0040.00714.37
5.6.330.0060.00714.01
5.6.320.0100.00414.38
5.6.310.0050.01014.33
5.6.300.0070.01114.34
5.6.290.0040.01114.38
5.6.280.0040.02916.57
5.6.270.0060.00914.38
5.6.260.0060.00614.31
5.6.250.0060.00914.35
5.6.240.0080.00514.40
5.6.230.0050.02416.42
5.6.220.0100.03316.43
5.6.210.0060.01916.20
5.6.200.0100.03316.55
5.6.190.0050.03016.53
5.6.180.0060.02316.47
5.6.170.0070.02216.46
5.6.160.0060.03016.57
5.6.150.0070.02616.47
5.6.140.0080.02916.66
5.6.130.0090.02916.52
5.6.120.0040.02316.45
5.6.110.0030.03216.46
5.6.100.0070.02116.48
5.6.90.0100.02216.55
5.6.80.0100.02816.34
5.6.70.0080.02616.31
5.6.60.0090.02016.30
5.6.50.0040.02116.15
5.6.40.0010.02616.24
5.6.30.0110.02116.28
5.6.20.0100.02816.28
5.6.10.0060.02016.18
5.6.00.0040.03116.36
5.5.380.0070.00512.72
5.5.370.0060.03715.23
5.5.360.0050.03615.37
5.5.350.0050.02015.28
5.5.340.0070.03015.45
5.5.330.0040.02415.50
5.5.320.0080.03115.50
5.5.310.0050.03415.43
5.5.300.0030.03215.63
5.5.290.0020.03215.37
5.5.280.0070.03115.49
5.5.270.0060.02915.34
5.5.260.0060.03415.48
5.5.250.0090.02915.29
5.5.240.0030.03315.24
5.5.230.0070.02815.15
5.5.220.0090.03115.30
5.5.210.0050.02915.11
5.5.200.0020.03215.31
5.5.190.0080.02715.09
5.5.180.0080.03015.24
5.5.170.0060.00312.78
5.5.160.0090.03015.20
5.5.150.0110.02815.24
5.5.140.0040.03115.18
5.5.130.0040.03015.18
5.5.120.0070.02515.22
5.5.110.0040.02915.27
5.5.100.0090.02815.17
5.5.90.0060.02715.22
5.5.80.0050.02815.16
5.5.70.0090.01815.13
5.5.60.0030.03315.11
5.5.50.0030.03315.19
5.5.40.0090.02915.07
5.5.30.0040.02515.05
5.5.20.0040.02815.22
5.5.10.0050.03015.08
5.5.00.0100.01615.12
5.4.450.0070.03515.23
5.4.440.0050.04215.30
5.4.430.0080.03715.36
5.4.420.0120.03815.27
5.4.410.0050.03415.30
5.4.400.0070.04115.06
5.4.390.0130.03015.15
5.4.380.0030.03815.10
5.4.370.0080.04015.16
5.4.360.0050.04015.01
5.4.350.0050.03415.01
5.4.340.0070.04015.19
5.4.330.0000.00811.18
5.4.320.0080.03915.10
5.4.310.0090.03715.11
5.4.300.0050.04015.14
5.4.290.0020.02315.12
5.4.280.0030.04615.15
5.4.270.0070.03215.15
5.4.260.0110.03115.20
5.4.250.0080.03415.10
5.4.240.0100.04215.18
5.4.230.0030.04115.20
5.4.220.0020.04515.10
5.4.210.0070.02915.10
5.4.200.0070.04115.17
5.4.190.0070.03015.01
5.4.180.0080.03715.16
5.4.170.0050.04515.18
5.4.160.0070.04215.16
5.4.150.0050.03915.16
5.4.140.0110.02213.77
5.4.130.0070.04013.82
5.4.120.0040.03813.84
5.4.110.0050.04213.79
5.4.100.0100.03813.87
5.4.90.0110.03713.78
5.4.80.0060.03013.77
5.4.70.0020.03613.82
5.4.60.0070.02313.77
5.4.50.0030.04013.83
5.4.40.0050.04213.87
5.4.30.0030.03813.71
5.4.20.0080.02313.79
5.4.10.0100.03813.72
5.4.00.0050.04313.48
5.3.290.0080.03512.97
5.3.280.0070.04012.92
5.3.270.0030.04712.96
5.3.260.0100.02012.86
5.3.250.0050.03812.86
5.3.240.0030.04112.86
5.3.230.0030.04512.96
5.3.220.0080.02912.91
5.3.210.0030.04312.94
5.3.200.0070.04012.94
5.3.190.0120.03612.93
5.3.180.0030.03712.95
5.3.170.0030.02512.84
5.3.160.0050.03612.84
5.3.150.0040.04112.89
5.3.140.0030.03012.90
5.3.130.0100.03012.85
5.3.120.0060.03912.88
5.3.110.0020.04212.92
5.3.100.0030.03812.65
5.3.90.0080.04012.58
5.3.80.0020.04712.62
5.3.70.0050.04212.57
5.3.60.0050.02612.65
5.3.50.0050.03812.59
5.3.40.0050.04112.60
5.3.30.0050.03512.57
5.3.20.0050.03512.47
5.3.10.0050.03212.48
5.3.00.0030.04112.41
5.2.170.0020.03411.44
5.2.160.0050.02711.44
5.2.150.0020.03711.44
5.2.140.0040.03611.44
5.2.130.0030.03311.44
5.2.120.0060.03211.44
5.2.110.0060.03011.44
5.2.100.0020.03711.44
5.2.90.0070.02811.44
5.2.80.0080.03211.44
5.2.70.0070.03211.44
5.2.60.0120.02811.44
5.2.50.0050.02011.44
5.2.40.0080.02811.44
5.2.30.0030.03511.44
5.2.20.0030.03511.44
5.2.10.0060.02811.44
5.2.00.0010.03511.44
5.1.60.0070.02611.44
5.1.50.0050.02511.44
5.1.40.0000.04011.44
5.1.30.0060.02511.44
5.1.20.0080.02811.44
5.1.10.0050.01611.44
5.1.00.0070.02011.44
5.0.50.0070.02011.44
5.0.40.0040.02311.44
5.0.30.0010.02811.44
5.0.20.0040.02411.44
5.0.10.0030.02311.44
5.0.00.0030.03011.44
4.4.90.0020.02111.44
4.4.80.0060.01711.44
4.4.70.0020.02011.44
4.4.60.0030.01711.44
4.4.50.0030.01711.44
4.4.40.0060.02611.44
4.4.30.0060.01411.44
4.4.20.0000.01911.44
4.4.10.0030.02211.44
4.4.00.0020.03011.44
4.3.110.0020.02011.44
4.3.100.0020.01111.44
4.3.90.0050.01511.44
4.3.80.0030.03011.44
4.3.70.0030.01911.44
4.3.60.0020.01711.44
4.3.50.0020.02011.44
4.3.40.0020.02511.44
4.3.30.0000.01211.44
4.3.20.0030.01511.44
4.3.10.0000.02111.44
4.3.00.0030.01811.44

preferences:
47.61 ms | 401 KiB | 5 Q