3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); $url = "https://mega.nz/#!PFdyDJaB!Ju3MUq68FV3YiEr2aqmFGqXMgl-1-gr0ORN0oBrNXWQ"; preg_match("/!(.+?)!/", $url, $output_array); $fileID = $output_array[1]; $domain = "meganz"; $lang = "en"; $apiURL = "https://eu.api.mega.co.nz/cs?domain=$domain&lang=$lang"; $value = array( array( 'a' => 'g', 'g' => 1, 'ssl' => 0, //0, 1, 2 (default is 2) 'p' => $fileID) // File id here ); $rawPOST = json_encode($value); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiURL ); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt($ch, CURLOPT_POST, true ); curl_setopt($ch, CURLOPT_POSTFIELDS, $rawPOST ); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain;charset=UTF-8')); $result=curl_exec($ch); $jsonResult = json_decode($result); $directLink = $jsonResult[0]->g; $fileSize = $jsonResult[0]->s; echo "URL: $directLink"; echo '<br>'; echo "File Size: $fileSize bytes"; echo '<br>'; ?>

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.40.0070.00719.07
8.3.30.0090.00618.92
8.3.20.0040.00420.39
8.3.10.0030.00621.82
8.3.00.0080.00018.03
8.2.170.0090.00622.96
8.2.160.0070.01020.28
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0000.00819.39
8.2.120.0000.00826.35
8.2.110.0070.01020.38
8.2.100.0080.00317.97
8.2.90.0050.00519.36
8.2.80.0050.00318.04
8.2.70.0030.00617.88
8.2.60.0040.00418.05
8.2.50.0030.00618.16
8.2.40.0080.00022.30
8.2.30.0040.00419.34
8.2.20.0050.00218.16
8.2.10.0040.00418.17
8.2.00.0050.00218.23
8.1.270.0070.00022.19
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0090.00023.61
8.1.230.0040.00820.97
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0040.00717.48
8.1.190.0050.00317.48
8.1.180.0030.00618.10
8.1.170.0000.00818.84
8.1.160.0000.00719.03
8.1.150.0040.00418.91
8.1.140.0000.00719.59
8.1.130.0030.00318.95
8.1.120.0000.00817.64
8.1.110.0040.00417.63
8.1.100.0030.00517.53
8.1.90.0040.00417.66
8.1.80.0040.00417.51
8.1.70.0040.00417.63
8.1.60.0040.00417.73
8.1.50.0040.00417.75
8.1.40.0040.00417.67
8.1.30.0000.00817.79
8.1.20.0040.00417.73
8.1.10.0030.00617.79
8.1.00.0030.00517.68
8.0.300.0000.00718.77
8.0.290.0000.00717.00
8.0.280.0070.00018.50
8.0.270.0030.00617.30
8.0.260.0000.00716.96
8.0.250.0000.00717.16
8.0.240.0100.00017.08
8.0.230.0040.00417.10
8.0.220.0030.00317.14
8.0.210.0040.00417.04
8.0.200.0000.00717.12
8.0.190.0050.00317.12
8.0.180.0040.00417.16
8.0.170.0070.00017.12
8.0.160.0000.00717.20
8.0.150.0070.00017.07
8.0.140.0040.00417.10
8.0.130.0000.00613.49
8.0.120.0090.00017.01
8.0.110.0070.00017.06
8.0.100.0040.00417.25
8.0.90.0000.00717.08
8.0.80.0060.01017.15
8.0.70.0000.00717.10
8.0.60.0000.00817.11
8.0.50.0040.00417.17
8.0.30.0080.00817.25
8.0.20.0120.00717.44
8.0.10.0040.00417.23
8.0.00.0100.00616.80
7.4.330.0050.00015.55
7.4.320.0030.00516.85
7.4.300.0030.00316.66
7.4.290.0050.00316.85
7.4.280.0030.00516.65
7.4.270.0000.00616.75
7.4.260.0000.00613.50
7.4.250.0050.00316.83
7.4.240.0000.00716.85
7.4.230.0070.00016.73
7.4.220.0110.00916.88
7.4.210.0080.00816.76
7.4.200.0020.00516.87
7.4.160.0130.00516.66
7.4.150.0130.00717.40
7.4.140.0110.00817.86
7.4.130.0110.00716.86
7.4.120.0080.01116.74
7.4.110.0120.00616.71
7.4.100.0160.00316.70
7.4.90.0030.01416.66
7.4.80.0080.00819.39
7.4.70.0030.01516.68
7.4.60.0130.00316.59
7.4.50.0110.00716.77
7.4.40.0100.01016.70
7.4.30.0100.00616.64
7.4.00.0100.00714.91
7.3.330.0030.00313.41
7.3.320.0050.00013.19
7.3.310.0000.00916.61
7.3.300.0000.00716.51
7.3.290.0060.00816.52
7.3.280.0100.00816.52
7.3.270.0070.01017.40
7.3.260.0090.00916.69
7.3.250.0080.01116.58
7.3.240.0060.01116.74
7.3.230.0080.00816.71
7.3.210.0120.00616.73
7.3.200.0030.01316.70
7.3.190.0070.01016.59
7.3.180.0090.01016.55
7.3.170.0110.00716.50
7.3.160.0150.00616.74
7.2.330.0130.01016.93
7.2.320.0110.00616.84
7.2.310.0180.00316.69
7.2.300.0150.01516.98
7.2.290.0100.00716.92
7.2.60.0100.00717.13
7.2.00.0030.00719.59
7.1.200.0090.00616.12
7.1.100.0060.00618.50
7.1.70.0030.01317.39
7.1.60.0240.00935.51
7.1.50.0230.00835.18
7.1.40.0270.01034.64
7.1.30.0230.01634.76
7.1.20.0150.01834.85
7.1.10.0030.01016.70
7.1.00.0060.01017.14
7.0.200.0130.00416.81
7.0.190.0080.01017.10
7.0.180.0040.01516.54
7.0.170.0080.01516.39
7.0.160.0050.01016.52
7.0.150.0050.01216.27
7.0.140.0090.00316.84
7.0.130.0070.01116.75
7.0.120.0030.01316.63
7.0.110.0020.01116.83
7.0.100.0060.01216.63
7.0.90.0050.01116.56
7.0.80.0000.01616.68
7.0.70.0080.00916.59
7.0.60.0070.00716.61
7.0.50.0000.01416.60
7.0.40.0030.01016.63
7.0.30.0000.01616.67
7.0.20.0090.00616.61
7.0.10.0090.00316.89
7.0.00.0030.00916.84

preferences:
107.22 ms | 400 KiB | 5 Q