3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_http_response_code($url) { $headers = get_headers($url); // echo substr($headers[0], 9, 3); $headers = substr($headers[0], 9, 3); // $headers = "bla"; // setting headers to bla works then $b = bla; var_dump($headers); //returns string 3 (404) return $headers; } $b = get_http_response_code('http://www.redcoon.es/res/shop/cataloge/product_200/B351504.jpg'); var_dump($b);

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.00417.25
8.3.50.0110.00718.18
8.3.40.0070.00718.85
8.3.30.0110.00318.86
8.3.20.0000.00820.32
8.3.10.0040.00424.03
8.3.00.0050.00320.04
8.2.180.0080.00818.30
8.2.170.0210.00022.96
8.2.160.0110.00420.52
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00621.20
8.2.120.0080.00026.35
8.2.110.0030.00721.32
8.2.100.0040.00718.05
8.2.90.0050.00319.48
8.2.80.0000.00817.97
8.2.70.0030.00517.88
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0050.00321.24
8.2.30.0080.00320.71
8.2.20.0030.00617.84
8.2.10.0050.00318.33
8.2.00.0050.00318.14
8.1.280.0070.01325.92
8.1.270.0080.00019.14
8.1.260.0080.00028.09
8.1.250.0030.00528.09
8.1.240.0040.00721.48
8.1.230.0090.00317.89
8.1.220.0050.00317.89
8.1.210.0040.00418.77
8.1.200.0050.00517.38
8.1.190.0080.00017.66
8.1.180.0050.00318.10
8.1.170.0000.00818.67
8.1.160.0040.00420.77
8.1.150.0040.00418.95
8.1.140.0080.00019.64
8.1.130.0040.00417.79
8.1.120.0040.00417.43
8.1.110.0050.00317.45
8.1.100.0070.00017.64
8.1.90.0000.00717.53
8.1.80.0000.00717.52
8.1.70.0040.00417.34
8.1.60.0000.00817.71
8.1.50.0050.00517.59
8.1.40.0030.00517.63
8.1.30.0000.00817.81
8.1.20.0030.00617.79
8.1.10.0000.00717.81
8.1.00.0050.00317.65
8.0.300.0080.00018.77
8.0.290.0030.00617.00
8.0.280.0070.00018.58
8.0.270.0000.00717.31
8.0.260.0030.00317.33
8.0.250.0080.00017.16
8.0.240.0030.00317.08
8.0.230.0000.00717.10
8.0.220.0040.00417.15
8.0.210.0000.00716.99
8.0.200.0000.00717.08
8.0.190.0040.00417.05
8.0.180.0070.00317.16
8.0.170.0000.00916.91
8.0.160.0000.00816.99
8.0.150.0000.00716.99
8.0.140.0060.00316.94
8.0.130.0000.00513.42
8.0.120.0080.00017.13
8.0.110.0080.00017.17
8.0.100.0050.00317.08
8.0.90.0000.00717.20
8.0.80.0100.00717.16
8.0.70.0000.00817.12
8.0.60.0040.00417.02
8.0.50.0050.00317.02
8.0.30.0130.00517.40
8.0.20.0090.01217.49
8.0.10.0080.00017.14
8.0.00.0110.01217.00
7.4.330.0050.00017.06
7.4.320.0000.00616.68
7.4.300.0040.00416.84
7.4.290.0070.00016.78
7.4.280.0040.00416.66
7.4.270.0030.00316.63
7.4.260.0040.00416.60
7.4.250.0060.00316.75
7.4.240.0060.00216.74
7.4.230.0040.00416.90
7.4.220.0140.00416.87
7.4.210.0130.00316.89
7.4.200.0040.00416.93
7.4.160.0060.01316.73
7.4.150.0130.01017.40
7.4.140.0030.01817.86
7.4.130.0110.01016.64
7.4.120.0080.01316.81
7.4.110.0120.00616.81
7.4.100.0140.00816.71
7.4.90.0180.00616.95
7.4.80.0090.00919.39
7.4.70.0090.00816.90
7.4.60.0060.01116.93
7.4.50.0020.01516.85
7.4.40.0150.00316.91
7.4.30.0090.00916.88
7.4.10.0030.01615.24
7.4.00.0050.01315.21
7.3.330.0030.00313.59
7.3.320.0030.00313.49
7.3.310.0000.00716.56
7.3.300.0050.00216.52
7.3.290.0090.00716.55
7.3.280.0110.00916.56
7.3.270.0030.01617.40
7.3.260.0170.00316.89
7.3.250.0100.01316.65
7.3.240.0090.00916.64
7.3.230.0090.01216.51
7.3.210.0150.00616.51
7.3.200.0070.01016.52
7.3.190.0140.00416.57
7.3.180.0090.00916.66
7.3.170.0100.00716.61
7.3.160.0150.00916.50
7.3.130.0060.01214.93
7.3.120.0080.00815.01
7.3.110.0100.00714.99
7.3.100.0090.00614.83
7.3.90.0060.00714.88
7.3.80.0070.00915.13
7.3.70.0060.00614.82
7.3.60.0030.01014.95
7.3.50.0060.00814.73
7.3.40.0070.00715.06
7.3.30.0030.01114.88
7.3.20.0100.00716.79
7.3.10.0080.00716.93
7.3.00.0050.00716.72
7.2.330.0030.02416.63
7.2.320.0060.01216.76
7.2.310.0060.01216.79
7.2.300.0150.00316.55
7.2.290.0130.00316.96
7.2.260.0080.01214.82
7.2.250.0050.01415.24
7.2.240.0060.01215.26
7.2.230.0070.00915.48
7.2.220.0070.01015.05
7.2.210.0050.01015.17
7.2.200.0080.00515.18
7.2.190.0070.00915.21
7.2.180.0080.00615.14
7.2.170.0080.00715.15
7.2.160.0110.00415.03
7.2.150.0050.01017.12
7.2.140.0050.00717.14
7.2.130.0050.00916.99
7.2.120.0050.01016.96
7.2.110.0070.00917.07
7.2.100.0050.00717.08
7.2.90.0090.00317.06
7.2.80.0060.00917.09
7.2.70.0070.00516.99
7.2.60.0080.00617.12
7.2.50.0020.01217.19
7.2.40.0060.00917.09
7.2.30.0070.00616.99
7.2.20.0060.01217.12
7.2.10.0100.00617.03
7.2.00.0060.00717.60
7.1.330.0090.00616.09
7.1.320.0050.01115.87
7.1.310.0080.00715.96
7.1.300.0060.00716.02
7.1.290.0020.01216.10
7.1.280.0090.00415.99
7.1.270.0060.00816.02
7.1.260.0090.00516.07
7.1.250.0070.00815.82
7.1.240.0010.01015.91
7.1.230.0090.00515.89
7.1.220.0050.00816.09
7.1.210.0020.01115.93
7.1.200.0080.00616.01
7.1.190.0090.00316.14
7.1.180.0140.00315.98
7.1.170.0020.01215.80
7.1.160.0030.01415.85
7.1.150.0050.01015.97
7.1.140.0050.00815.96
7.1.130.0050.01316.03
7.1.120.0080.00515.95
7.1.110.0050.01216.16
7.1.100.0070.00716.63
7.1.90.0090.00916.06
7.1.80.0050.01216.20
7.1.70.0100.00316.54
7.1.60.0050.01117.00
7.1.50.0060.00916.60
7.1.40.0060.00616.02
7.1.30.0080.00615.98
7.1.20.0050.00915.93
7.1.10.0020.01115.84
7.1.00.0060.02918.14
7.0.330.0050.01015.60
7.0.320.0060.00715.52
7.0.310.0070.00815.38
7.0.300.0050.00815.60
7.0.290.0070.00815.43
7.0.280.0080.00815.42
7.0.270.0130.00415.59
7.0.260.0060.00515.42
7.0.250.0050.00815.49
7.0.240.0100.00515.62
7.0.230.0050.01015.50
7.0.220.0000.01115.64
7.0.210.0040.00915.61
7.0.200.0070.00315.99
7.0.190.0080.00315.50
7.0.180.0090.00515.34
7.0.170.0070.00815.78
7.0.160.0040.01215.57
7.0.150.0140.00015.47
7.0.140.0100.00515.58
7.0.130.0040.00815.56
7.0.120.0080.00315.46
7.0.110.0090.00615.34
7.0.100.0060.00715.74
7.0.90.0060.02117.22
7.0.80.0140.02517.10
7.0.70.0260.03017.28
7.0.60.0190.03117.10
7.0.50.0200.02917.42
7.0.40.0040.03615.91
7.0.30.0050.02815.90
7.0.20.0030.02315.93
7.0.10.0050.03315.92
7.0.00.0070.01915.89
5.6.400.0110.00314.49
5.6.390.0060.00914.62
5.6.380.0070.00614.56
5.6.370.0060.00614.38
5.6.360.0070.00714.61
5.6.350.0070.00814.71
5.6.340.0050.01014.67
5.6.330.0040.00914.73
5.6.320.0050.01014.38
5.6.310.0110.00214.40
5.6.300.0100.00314.46
5.6.290.0090.00514.64
5.6.280.0070.01716.61
5.6.270.0040.01114.68
5.6.260.0050.00814.56
5.6.250.0070.00814.61
5.6.240.0040.00814.48
5.6.230.0130.02316.56
5.6.220.0080.02916.64
5.6.210.0070.03316.70
5.6.200.0040.03516.79
5.6.190.0070.03416.75
5.6.180.0050.03816.77
5.6.170.0070.02916.78
5.6.160.0060.02916.64
5.6.150.0030.03716.67
5.6.140.0020.03516.84
5.6.130.0090.01816.82
5.6.120.0070.03316.85
5.6.110.0070.03116.67
5.6.100.0070.02716.94
5.6.90.0060.02216.83
5.6.80.0100.02416.46
5.6.70.0050.03316.54
5.6.60.0070.03216.60
5.6.50.0020.03416.55
5.6.40.0060.03516.54
5.6.30.0100.02416.51
5.6.20.0090.01816.43
5.6.10.0060.01816.61
5.6.00.0100.02916.46
5.5.380.0020.01014.40
5.5.370.0090.03016.50
5.5.360.0090.03416.61
5.5.350.0090.02116.58
5.5.340.0050.03116.65
5.5.330.0070.03216.44
5.5.320.0050.03416.63
5.5.310.0090.02316.50
5.5.300.0060.02616.55
5.5.290.0090.03016.54
5.5.280.0080.03216.54
5.5.270.0100.02816.58
5.5.260.0070.03316.74
5.5.250.0070.01916.39
5.5.240.0080.01816.30
5.5.230.0060.02116.36
5.5.220.0080.02616.42
5.5.210.0070.02616.42
5.5.200.0050.02916.43
5.5.190.0090.03216.48
5.5.180.0090.03316.43
5.5.170.0050.01014.27
5.5.160.0070.03116.31
5.5.150.0040.03416.29
5.5.140.0060.02516.56
5.5.130.0110.02816.33
5.5.120.0090.02416.29
5.5.110.0100.03116.34
5.5.100.0060.03116.36
5.5.90.0080.03316.55
5.5.80.0050.03316.38
5.5.70.0120.02616.33
5.5.60.0080.02416.41
5.5.50.0060.03116.26
5.5.40.0070.02116.40
5.5.30.0070.02216.33
5.5.20.0080.01516.25
5.5.10.0080.02616.48
5.5.00.0080.03116.27

preferences:
56.28 ms | 401 KiB | 5 Q