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://noneexisting.com/blabla.html'); 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.70.0170.00318.55
8.3.60.0140.00718.80
8.3.50.0130.00522.24
8.3.40.0070.01419.13
8.3.30.0000.01519.06
8.3.20.0040.00418.91
8.3.10.0080.00021.21
8.3.00.0030.00723.86
8.2.190.0090.01218.91
8.2.180.0100.00717.13
8.2.170.0120.00322.96
8.2.160.0130.00321.27
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0080.00021.23
8.2.110.0050.00520.77
8.2.100.0030.00918.09
8.2.90.0060.00318.34
8.2.80.0040.00418.15
8.2.70.0060.00317.63
8.2.60.0050.00318.05
8.2.50.0030.00618.07
8.2.40.0080.00018.22
8.2.30.0000.00719.77
8.2.20.0050.00317.90
8.2.10.0030.00617.97
8.2.00.0040.00417.79
8.1.280.0080.00825.92
8.1.270.0030.00923.99
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00723.89
8.1.230.0030.01022.12
8.1.220.0030.00617.91
8.1.210.0030.00619.16
8.1.200.0060.00317.50
8.1.190.0000.00817.78
8.1.180.0030.00518.10
8.1.170.0050.00318.59
8.1.160.0030.00518.95
8.1.150.0030.00618.80
8.1.140.0050.00317.59
8.1.130.0000.00718.05
8.1.120.0040.00417.52
8.1.110.0000.00917.49
8.1.100.0070.00017.44
8.1.90.0030.00617.51
8.1.80.0040.00417.63
8.1.70.0070.00017.50
8.1.60.0030.00617.82
8.1.50.0090.00017.68
8.1.40.0040.00417.70
8.1.30.0030.00617.79
8.1.20.0040.00417.91
8.1.10.0080.00017.75
8.1.00.0070.00317.71
8.0.300.0040.00420.29
8.0.290.0060.00317.16
8.0.280.0040.00418.52
8.0.270.0040.00417.44
8.0.260.0000.00716.93
8.0.250.0040.00417.11
8.0.240.0060.00317.14
8.0.230.0070.00017.00
8.0.220.0030.00317.04
8.0.210.0000.00717.02
8.0.200.0060.00017.17
8.0.190.0050.00317.11
8.0.180.0000.00717.06
8.0.170.0050.00316.96
8.0.160.0040.00417.01
8.0.150.0080.00016.94
8.0.140.0030.00516.96
8.0.130.0000.00613.59
8.0.120.0030.00617.04
8.0.110.0020.00517.14
8.0.100.0040.00417.03
8.0.90.0040.00417.04
8.0.80.0040.01117.17
8.0.70.0080.00017.02
8.0.60.0070.00017.06
8.0.50.0000.00817.06
8.0.30.0100.00917.28
8.0.20.0110.00917.40
8.0.10.0070.00017.16
8.0.00.0060.01717.10
7.4.330.0030.00317.03
7.4.320.0000.00716.49
7.4.300.0000.00616.73
7.4.290.0000.00716.63
7.4.280.0040.00416.61
7.4.270.0070.00016.73
7.4.260.0030.00313.43
7.4.250.0030.00616.60
7.4.240.0030.00516.81
7.4.230.0030.00316.76
7.4.220.0220.00016.70
7.4.210.0070.01016.76
7.4.200.0050.00216.86
7.4.190.0000.00716.78
7.4.150.0420.02617.40
7.4.140.0080.01017.86
7.4.130.0040.01516.69
7.4.120.0100.00816.78
7.4.110.0090.00916.56
7.4.100.0090.00916.84
7.4.90.0150.00316.54
7.4.80.0200.00019.39
7.4.70.0120.00916.58
7.4.60.0110.00716.89
7.4.50.0000.00916.71
7.4.40.0060.00822.77
7.4.30.0120.00916.80
7.4.00.0060.01215.42
7.3.330.0000.00513.53
7.3.320.0000.00513.39
7.3.310.0080.00016.51
7.3.300.0070.00016.61
7.3.290.0070.01316.57
7.3.280.0090.00816.54
7.3.270.0130.00717.40
7.3.260.0110.00918.24
7.3.250.0150.00416.73
7.3.240.0120.00616.67
7.3.230.0100.00716.63
7.3.210.0110.00716.54
7.3.200.0090.00919.39
7.3.190.0130.00416.58
7.3.180.0110.00616.59
7.3.170.0110.00716.60
7.3.160.0120.00616.50
7.3.120.0070.00815.13
7.2.330.0060.01216.53
7.2.320.0120.00616.91
7.2.310.0130.00716.61
7.2.300.0110.01116.71
7.2.290.0170.01016.75
7.2.60.0060.00617.31
7.1.200.0030.00615.84
7.1.70.0040.00417.70
7.1.60.0100.00317.53
7.1.50.0140.01417.29
7.1.00.0030.06722.63
7.0.200.0090.00916.77
7.0.140.0000.07722.64
7.0.110.0100.08320.23
7.0.100.0700.05720.52
7.0.90.0770.07720.52
7.0.80.0070.08320.31
7.0.70.0670.08020.29
7.0.60.0470.07020.45
7.0.50.0530.06720.93
7.0.40.0030.08020.52
7.0.30.0070.05320.44
7.0.20.0170.07320.39
7.0.10.0070.08020.67
7.0.00.0030.08320.44
5.6.280.0100.06721.44
5.6.260.0100.04721.11
5.6.250.0130.07721.16
5.6.240.0070.08720.91
5.6.230.0200.07321.16
5.6.220.0030.06020.91
5.6.210.0170.06321.10
5.6.200.0100.08021.44
5.6.190.0100.08021.33
5.6.180.0100.08321.57
5.6.170.0070.08721.69
5.6.160.0070.08021.48
5.6.150.0130.07321.43
5.6.140.0030.05021.31
5.6.130.0070.07021.31
5.6.120.0070.08321.43
5.6.110.0170.03721.47
5.6.100.0100.07721.36
5.6.90.0030.08321.34
5.6.80.0000.04320.73
5.6.70.0000.08320.75
5.6.60.0070.07320.93
5.6.50.0030.05320.82
5.6.40.0070.08321.13
5.6.30.0000.05720.77
5.6.20.0130.07321.12
5.6.10.0100.04721.12
5.6.00.0130.07320.91
5.5.380.0000.08020.71
5.5.370.0130.07720.67
5.5.360.0000.05720.70
5.5.350.0030.07020.84
5.5.340.0200.07321.18
5.5.330.0030.05721.51
5.5.320.0070.08021.32
5.5.310.0070.08321.51
5.5.300.0030.09021.16
5.5.290.0130.07721.28
5.5.280.0070.05021.18
5.5.270.0000.04321.15
5.5.260.0070.04321.36
5.5.250.0030.07321.18
5.5.240.0070.03720.51
5.5.230.0070.04720.66
5.5.220.0070.07720.48
5.5.210.0130.07720.61
5.5.200.0100.07020.55
5.5.190.0030.08320.69
5.5.180.0100.08320.61
5.5.160.0130.07020.54
5.5.150.0070.07320.48
5.5.140.0000.08320.48
5.5.130.0070.08020.86
5.5.120.0070.03720.58
5.5.110.0030.08020.59
5.5.100.0100.08020.39
5.5.90.0100.07320.54
5.5.80.0130.06720.40
5.5.70.0070.08020.42
5.5.60.0070.07720.55
5.5.50.0100.08020.54
5.5.40.0130.07020.50
5.5.30.0100.06720.32
5.5.20.0100.07020.38
5.5.10.0170.06320.43
5.5.00.0000.04720.39
5.4.450.0130.07319.88
5.4.440.0100.07719.83
5.4.430.0130.07019.72
5.4.420.0000.08319.60
5.4.410.0130.05719.43
5.4.400.0030.07019.55
5.4.390.0100.07719.28
5.4.380.0070.07019.41
5.4.370.0070.07319.56
5.4.360.0070.07719.56
5.4.350.0070.07319.26
5.4.340.0070.07719.72
5.4.320.0030.05019.28
5.4.310.0130.06719.56
5.4.300.0000.08019.69
5.4.290.0130.07019.69
5.4.280.0070.08019.55
5.4.270.0100.07719.32
5.4.260.0030.07719.41
5.4.250.0030.08019.40
5.4.240.0070.07019.32
5.4.230.0100.06719.71
5.4.220.0130.07319.40
5.4.210.0100.07319.39
5.4.200.0130.06319.41
5.4.190.0030.07319.19
5.4.180.0130.04319.25
5.4.170.0070.07719.41
5.4.160.0100.08019.53
5.4.150.0070.08019.31
5.4.140.0070.07016.82
5.4.130.0030.06717.03
5.4.120.0030.04716.85
5.4.110.0030.04716.79
5.4.100.0170.07016.97
5.4.90.0030.04016.70
5.4.80.0000.05316.95
5.4.70.0070.03716.85
5.4.60.0070.03316.94
5.4.50.0030.04716.74
5.4.40.0000.04016.76
5.4.30.0070.03716.85
5.4.20.0000.03716.76
5.4.10.0070.06716.83
5.4.00.0000.04016.46
5.3.290.0100.07314.85
5.3.280.0030.07714.73
5.3.270.0030.07314.93
5.3.260.0070.07314.94
5.3.250.0030.07714.75
5.3.240.0000.05014.77
5.3.230.0030.07714.88
5.3.220.0130.04314.71
5.3.210.0070.07714.78
5.3.200.0070.06714.73
5.3.190.0070.04314.85
5.3.180.0030.07714.55
5.3.170.0130.03014.56
5.3.160.0030.03714.56
5.3.150.0070.03714.90
5.3.140.0000.04014.88
5.3.130.0030.04014.72
5.3.120.0030.03714.71
5.3.110.0030.03714.82
5.3.100.0070.03314.39
5.3.90.0030.04014.45
5.3.80.0000.04014.28
5.3.70.0100.05714.23
5.3.60.0070.04314.29
5.3.50.0070.06314.16
5.3.40.0070.07014.18
5.3.30.0000.03713.98
5.3.20.0070.03013.92
5.3.10.0030.06313.67
5.3.00.0070.03013.98
5.2.170.0030.02711.69
5.2.160.0000.03311.69
5.2.150.0000.03311.69
5.2.140.0000.03311.69
5.2.130.0030.02711.69
5.2.120.0000.03311.69
5.2.110.0030.03011.69
5.2.100.0000.03011.69
5.2.90.0070.02311.69
5.2.80.0000.03311.69
5.2.70.0000.03011.69
5.2.60.0000.03011.69
5.2.50.0030.03311.69
5.2.40.0030.02711.69
5.2.30.0030.04311.69
5.2.20.0000.03311.69
5.2.10.0000.03011.69
5.2.00.0100.02711.69
5.1.60.0030.02311.69
5.1.50.0000.02711.69
5.1.40.0000.03011.69
5.1.30.0000.02711.69
5.1.20.0000.03311.69
5.1.10.0030.02311.69
5.1.00.0000.02711.69
5.0.50.0030.02011.69
5.0.40.0000.02011.69
5.0.30.0000.03311.69
5.0.20.0030.01711.69
5.0.10.0000.02011.69
5.0.00.0000.03011.69
4.4.90.0030.01311.69
4.4.80.0000.01711.69
4.4.70.0000.01711.69
4.4.60.0000.01711.69
4.4.50.0000.01711.69
4.4.40.0000.02711.69
4.4.30.0000.01711.69
4.4.20.0000.01711.69
4.4.10.0070.01711.69
4.4.00.0030.02311.69
4.3.110.0030.01311.69
4.3.100.0000.02711.69
4.3.90.0000.02711.69
4.3.80.0000.02711.69
4.3.70.0000.01311.69
4.3.60.0070.02711.69
4.3.50.0000.02311.69
4.3.40.0000.03711.69
4.3.30.0030.02011.69
4.3.20.0000.01311.69
4.3.10.0000.03011.69
4.3.00.0070.03011.69

preferences:
46.63 ms | 401 KiB | 5 Q