3v4l.org

run code in 300+ PHP versions simultaneously
<?php // test URLs $urls = array( "http://www.cnn.com", "http://www.mozilla.com", "http://www.facebook.com" ); // test browsers $browsers = array( "standard" => array ( "user_agent" => "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)", "language" => "en-us,en;q=0.5" ), "iphone" => array ( "user_agent" => "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A537a Safari/419.3", "language" => "en" ), "french" => array ( "user_agent" => "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; .NET CLR 2.0.50727)", "language" => "fr,fr-FR;q=0.5" ) ); foreach ($urls as $url) { echo "URL: $url\n"; foreach ($browsers as $test_name => $browser) { $ch = curl_init(); // set url curl_setopt($ch, CURLOPT_URL, $url); // set browser specific headers curl_setopt($ch, CURLOPT_HTTPHEADER, array( "User-Agent: {$browser['user_agent']}", "Accept-Language: {$browser['language']}" )); // we don't want the page contents curl_setopt($ch, CURLOPT_NOBODY, 1); // we need the HTTP Header returned curl_setopt($ch, CURLOPT_HEADER, 1); // return the results instead of outputting it curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); // was there a redirection HTTP header? if (preg_match("!Location: (.*)!", $output, $matches)) { echo "$test_name: redirects to $matches[1]\n"; } else { echo "$test_name: no redirection\n"; } } echo "\n\n"; }

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.0140.00018.22
8.3.50.0080.01021.08
8.3.40.0090.00618.87
8.3.30.0060.01018.70
8.3.20.0030.00620.16
8.3.10.0080.00021.73
8.3.00.0040.00419.44
8.2.180.0090.00616.75
8.2.170.0100.00722.96
8.2.160.0120.00320.34
8.2.150.0040.00424.18
8.2.140.0090.00624.66
8.2.130.0070.00026.16
8.2.120.0060.00317.88
8.2.110.0040.00420.57
8.2.100.0060.00617.50
8.2.90.0030.00619.21
8.2.80.0080.00017.97
8.2.70.0070.00317.50
8.2.60.0000.00918.05
8.2.50.0000.00818.07
8.2.40.0080.00021.07
8.2.30.0040.00419.72
8.2.20.0030.00617.86
8.2.10.0000.00818.01
8.2.00.0040.00418.13
8.1.280.0070.01025.92
8.1.270.0100.00720.38
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.84
8.1.230.0040.00817.50
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0030.00617.13
8.1.180.0070.00018.10
8.1.170.0040.00418.48
8.1.160.0030.00521.98
8.1.150.0040.00418.86
8.1.140.0030.00617.47
8.1.130.0000.00717.59
8.1.120.0040.00417.55
8.1.110.0040.00417.51
8.1.100.0000.00717.38
8.1.90.0000.00717.37
8.1.80.0030.00317.50
8.1.70.0030.00617.41
8.1.60.0040.00417.64
8.1.50.0030.00517.57
8.1.40.0050.00317.47
8.1.30.0050.00317.53
8.1.20.0040.00417.56
8.1.10.0000.00817.64
8.1.00.0000.00717.47
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.33
8.0.270.0070.00017.15
8.0.260.0000.00617.28
8.0.250.0040.00417.04
8.0.240.0000.00717.08
8.0.230.0070.00017.04
8.0.220.0070.00016.87
8.0.210.0000.00716.87
8.0.200.0030.00316.98
8.0.190.0000.00816.95
8.0.180.0040.00416.99
8.0.170.0040.00417.00
8.0.160.0070.00017.03
8.0.150.0080.00016.82
8.0.140.0040.00416.98
8.0.130.0030.00313.44
8.0.120.0050.00316.92
8.0.110.0030.00616.82
8.0.100.0000.00716.78
8.0.90.0000.00716.75
8.0.80.0130.00317.04
8.0.70.0070.00016.82
8.0.60.0030.00516.86
8.0.50.0040.00416.92
8.0.30.0100.00717.18
8.0.20.0080.01117.40
8.0.10.0000.00717.13
8.0.00.0050.01316.72
7.4.330.0020.00215.08
7.4.320.0080.00016.59
7.4.300.0060.00016.52
7.4.290.0070.00016.53
7.4.280.0040.00416.56
7.4.270.0030.00516.53
7.4.260.0000.00716.43
7.4.250.0040.00416.56
7.4.240.0020.00516.57
7.4.230.0000.00716.52
7.4.220.0030.01616.57
7.4.210.0080.00616.63
7.4.200.0070.00016.69
7.4.160.0100.00716.32
7.4.150.0040.01517.40
7.4.140.0150.00717.86
7.4.130.0130.00816.42
7.4.120.0140.01016.57
7.4.110.0120.00616.60
7.4.100.0090.01316.68
7.4.90.0090.00916.57
7.4.80.0030.01619.39
7.4.70.0070.01316.50
7.4.60.0060.01016.49
7.4.50.0000.00816.44
7.4.40.0060.01316.64
7.4.30.0070.01016.52
7.4.00.0040.00714.84
7.3.330.0050.00013.25
7.3.320.0060.00013.35
7.3.310.0040.00416.55
7.3.300.0070.00016.45
7.3.290.0090.00716.44
7.3.280.0110.00916.41
7.3.270.0100.00717.40
7.3.260.0170.00716.50
7.3.250.0140.00416.55
7.3.240.0070.01016.46
7.3.230.0060.01016.45
7.3.210.0130.01016.46
7.3.200.0090.00916.63
7.3.190.0090.00616.52
7.3.180.0070.01016.39
7.3.170.0080.00816.49
7.3.160.0100.00716.70
7.2.330.0070.01016.60
7.2.320.0040.01416.77
7.2.310.0130.00316.50
7.2.300.0200.00316.38
7.2.290.0070.01616.88
7.2.60.0090.00617.02
7.2.00.0030.01019.26
7.1.200.0070.00715.88
7.1.100.0040.00717.86
7.1.70.0100.00017.07
7.1.60.0090.01220.03
7.1.50.0100.01016.61
7.1.00.0070.07322.44
7.0.200.0870.00614.80
7.0.60.0100.06719.82
7.0.50.0070.05017.70
7.0.40.0070.08320.07
7.0.30.0270.08320.21
7.0.20.0300.06320.02
7.0.10.0200.09320.33
7.0.00.0070.09020.09
5.6.280.0000.06720.83
5.6.210.0130.08020.54
5.6.200.0170.07018.19
5.6.190.0000.04720.61
5.6.180.0030.05320.56
5.6.170.0270.05320.48
5.6.160.0100.04020.70
5.6.150.0030.08318.17
5.6.140.0000.06318.20
5.6.130.0070.08318.11
5.6.120.0000.04321.13
5.6.110.0030.07321.00
5.6.100.0100.08021.14
5.6.90.0130.07721.01
5.6.80.0030.08720.52
5.6.70.4330.04020.34
5.5.350.0070.08020.41
5.5.340.0000.08718.02
5.5.330.0130.08020.06
5.5.320.0400.06720.31
5.5.310.0300.06720.31
5.5.300.0130.07317.88
5.5.290.0200.06317.88
5.5.280.0070.06720.97
5.5.270.0100.07720.85
5.5.260.0130.07320.69
5.5.250.0100.08320.59
5.5.240.0070.08320.36
5.4.450.0230.05719.45
5.4.440.0270.05319.47
5.4.430.0230.04319.47
5.4.420.0200.07019.31
5.4.410.0100.07319.00
5.4.400.0170.04718.94
5.4.390.0230.05019.19
5.4.380.0300.04319.15
5.4.370.0100.06018.99
5.4.360.0270.04719.13
5.4.350.0170.05319.08
5.4.340.0200.05318.92
5.4.320.0270.05719.13
5.4.310.0200.06719.14
5.4.300.0270.04319.29
5.4.290.0170.05719.12
5.4.280.0170.05318.94
5.4.270.0200.05018.94
5.4.260.0170.05018.91
5.4.250.0100.06018.78
5.4.240.0100.06019.25
5.4.230.0170.05318.94
5.4.220.0270.04718.81
5.4.210.0230.05319.23
5.4.200.0300.03719.11
5.4.190.0230.04719.16
5.4.180.0130.05718.93
5.4.170.0170.06319.09
5.4.160.0130.05319.10
5.4.150.0170.07019.11
5.4.140.0230.06316.51
5.4.130.0130.05016.46
5.4.120.0230.05316.32
5.4.110.0200.06016.56
5.4.100.0200.04716.44
5.4.90.0230.04316.23
5.4.80.0070.05716.53
5.4.70.0030.03316.21
5.4.60.0100.07016.48
5.4.50.0000.06316.39
5.4.40.0000.04016.41
5.4.30.0330.04316.38
5.4.20.0230.04316.41
5.4.10.0000.04716.45

preferences:
49.41 ms | 401 KiB | 5 Q