3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP error_reporting(); ini_set('display_errors', 'On'); function makeRequest($url, $requestBody) { $handle = curl_init(); $headers = array(); //array of request headers //Example headers for standart browser request //$headers = array( // 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($handle, CURLOPT_POST, 1); curl_setopt($handle, CURLOPT_POSTFIELDS, $requestBody); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_HEADER, 1); //This means include headers in response $result = curl_exec($handle); $header_size = curl_getinfo($handle, CURLINFO_HEADER_SIZE); $responseHeaders = substr($result, 0, $header_size); $responseBody = substr($result, $header_size, strlen($result) - $header_size); $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($httpCode == 200) return $responseBody; else throw new Exception($responseBody); } $method = $_SERVER["REQUEST_METHOD"]; $request = array(); $request["a"] = "1"; $request["b"] = "3"; $request["c"] = "4"; $request["d"] = "7"; //$request = "a=1&b=3&c=4&d=7"; //This is the same with array version for standart post request. $response = makeRequest("http://httpbin.org/post", $request); echo $response; ?>

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.0060.01518.55
8.3.50.0150.00421.99
8.3.40.0090.00619.06
8.3.30.0040.01118.84
8.3.20.0170.00320.19
8.3.10.0040.01120.61
8.3.00.0080.00020.59
8.2.180.0140.00018.42
8.2.170.0140.00722.96
8.2.160.0040.01422.14
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00320.74
8.2.120.0080.00026.35
8.2.110.0110.00019.36
8.2.100.0230.00018.00
8.2.90.0080.00019.41
8.2.80.0040.00417.97
8.2.70.0090.00017.75
8.2.60.0050.00318.04
8.2.50.0030.00718.09
8.2.40.0040.00420.41
8.2.30.0070.00019.42
8.2.20.0050.00317.71
8.2.10.0000.00818.15
8.2.00.0040.00418.20
8.1.280.0110.00325.92
8.1.270.0050.00323.96
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.00921.34
8.1.230.0090.00317.52
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0060.00317.36
8.1.180.0070.00018.10
8.1.170.0000.01118.63
8.1.160.0000.00820.89
8.1.150.0030.00518.94
8.1.140.0000.00819.52
8.1.130.0030.00617.79
8.1.120.0040.00417.52
8.1.110.0000.00717.41
8.1.100.0050.00217.43
8.1.90.0040.00417.46
8.1.80.0030.00517.39
8.1.70.0000.00917.50
8.1.60.0000.00817.68
8.1.50.0030.00517.52
8.1.40.0040.00417.61
8.1.30.0050.00317.58
8.1.20.0040.00417.51
8.1.10.0030.00617.58
8.1.00.0060.00317.60
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0050.00218.35
8.0.270.0000.00717.33
8.0.260.0000.00717.28
8.0.250.0000.00717.10
8.0.240.0030.00516.91
8.0.230.0070.00017.00
8.0.220.0050.00316.88
8.0.210.0040.00417.04
8.0.200.0000.00617.03
8.0.190.0070.00317.11
8.0.180.0040.00416.83
8.0.170.0040.00416.95
8.0.160.0000.00716.92
8.0.150.0070.00016.89
8.0.140.0040.00416.99
8.0.130.0060.00013.47
8.0.120.0090.00016.96
8.0.110.0000.00816.81
8.0.100.0050.00316.97
8.0.90.0080.00017.02
8.0.80.0060.00916.93
8.0.70.0050.00216.91
8.0.60.0070.00017.03
8.0.50.0000.00716.86
8.0.30.0110.00816.98
8.0.20.0120.00717.40
8.0.10.0030.00517.12
8.0.00.0090.01316.89
7.4.330.0050.00016.65
7.4.320.0000.00716.69
7.4.300.0000.00616.55
7.4.290.0030.00316.64
7.4.280.0070.00016.59
7.4.270.0030.00316.40
7.4.260.0000.00816.60
7.4.250.0040.00416.44
7.4.240.0040.00416.40
7.4.230.0030.00316.45
7.4.220.0060.01216.63
7.4.210.0090.00916.65
7.4.200.0000.00816.66
7.4.160.0130.00316.57
7.4.150.0100.01417.40
7.4.140.0140.01217.86
7.4.130.0050.01216.63
7.4.120.0100.00716.61
7.4.110.0070.01016.46
7.4.100.0160.00616.62
7.4.90.0100.01016.66
7.4.80.0120.00619.39
7.4.70.0100.00616.77
7.4.60.0070.01116.57
7.4.50.0060.00916.64
7.4.40.0070.01116.66
7.4.30.0070.01016.71
7.4.00.0070.01015.22
7.3.330.0060.00013.33
7.3.320.0040.00413.39
7.3.310.0000.00716.26
7.3.300.0040.00416.26
7.3.290.0000.00716.34
7.3.280.0100.00716.40
7.3.270.0120.00617.40
7.3.260.0110.00616.39
7.3.250.0150.00616.45
7.3.240.0090.00816.53
7.3.230.0090.00916.60
7.3.210.0100.00716.50
7.3.200.0130.01316.57
7.3.190.0110.00616.64
7.3.180.0100.00616.44
7.3.170.0120.00916.38
7.3.160.0030.01316.48
7.2.330.0130.01316.83
7.2.320.0090.00916.80
7.2.310.0100.00716.70
7.2.300.0060.01016.63
7.2.290.0100.00716.62
7.2.60.0030.00917.10
7.2.00.0050.00919.40
7.1.200.0130.00315.83
7.1.100.0060.00618.28
7.1.70.0000.00817.32
7.1.60.0000.02319.27
7.1.50.0030.01516.96
7.1.00.0130.06322.45
7.0.200.0210.00414.79
7.0.60.0030.08021.65
7.0.50.0070.08717.95
7.0.40.0100.04020.32
7.0.30.0170.04720.08
7.0.20.0300.07720.28
7.0.10.0070.05020.15
7.0.00.0070.05720.33
5.6.280.0030.04321.09
5.6.210.0070.08020.58
5.6.200.0130.05318.27
5.6.190.0130.08320.64
5.6.180.0300.07720.50
5.6.170.0200.04720.47
5.6.160.0100.08020.47
5.6.150.0100.07718.13
5.6.140.0030.08718.21
5.6.130.0030.07318.28
5.6.120.0030.07721.02
5.6.110.0170.03021.02
5.6.100.0000.04320.98
5.6.90.0130.07721.13
5.6.80.0030.06320.35
5.5.350.0330.07020.51
5.5.340.0030.04018.05
5.5.330.0130.05320.35
5.5.320.0130.04720.37
5.5.310.0370.05320.28
5.5.300.0070.06017.95
5.5.290.0130.07717.95
5.5.280.0100.06320.70
5.5.270.0100.06720.98
5.5.260.0030.08720.79
5.5.250.0030.04020.60
5.5.240.0000.08020.20

preferences:
45.62 ms | 401 KiB | 5 Q