3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HTTP { private static $headers = array(); public static function redirect($newLocation, $temporary = false) { if($temporary) { header("HTTP/1.0 307 Temporary Redirect"); } else { header("HTTP/1.0 301 Moved Permanently"); } header("Location: " . $newLocation); exit(); } public static function objRedirect(URL $url, $temporary = false) { HTTP::redirect(Config::getValue("baseUrl") . $url, $temporary); } public static function disableCaching() { header("Cache-Control: no-cache, must-revalidate"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); } public static function addHeader($type, $content) { array_push(HTTP::$headers, array("type" => $type, "content" => $content)); } public static function getHeaders() { return HTTP::$headers; } } ?>

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.00416.63
8.3.50.0110.01117.36
8.3.40.0070.00718.41
8.3.30.0110.00720.32
8.3.20.0030.00518.55
8.3.10.0030.00620.23
8.3.00.0050.00319.25
8.2.180.0150.00616.50
8.2.170.0070.00722.96
8.2.160.0060.01020.98
8.2.150.0060.01324.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0000.00719.82
8.2.110.0030.00622.15
8.2.100.0090.00317.59
8.2.90.0030.00619.00
8.2.80.0040.00417.97
8.2.70.0080.00017.38
8.2.60.0030.00617.91
8.2.50.0040.00418.07
8.2.40.0020.00517.94
8.2.30.0040.00417.99
8.2.20.0000.00717.36
8.2.10.0040.00417.43
8.2.00.0050.00717.43
8.1.280.0030.01225.92
8.1.270.0060.00324.66
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0000.00822.23
8.1.230.0110.00017.42
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0090.00017.23
8.1.190.0040.00417.41
8.1.180.0030.00518.10
8.1.170.0030.00518.54
8.1.160.0040.00418.72
8.1.150.0050.00218.52
8.1.140.0040.00717.35
8.1.130.0000.00717.69
8.1.120.0030.00317.34
8.1.110.0050.00317.33
8.1.100.0000.00817.22
8.1.90.0000.00717.23
8.1.80.0030.00317.36
8.1.70.0000.00717.22
8.1.60.0040.00417.42
8.1.50.0000.00717.40
8.1.40.0000.00917.45
8.1.30.0040.00417.57
8.1.20.0000.00817.55
8.1.10.0050.00317.44
8.1.00.0000.00717.36
8.0.300.0040.00418.77
8.0.290.0000.00916.63
8.0.280.0070.00018.25
8.0.270.0040.00417.07
8.0.260.0000.00716.61
8.0.250.0040.00416.88
8.0.240.0110.00016.75
8.0.230.0030.00316.71
8.0.220.0060.00016.77
8.0.210.0070.00016.67
8.0.200.0070.00016.71
8.0.190.0070.00016.74
8.0.180.0040.00416.79
8.0.170.0030.00616.81
8.0.160.0000.00716.73
8.0.150.0040.00416.67
8.0.140.0000.00916.69
8.0.130.0060.00013.26
8.0.120.0040.00416.63
8.0.110.0000.00716.74
8.0.100.0040.00416.83
8.0.90.0000.00716.66
8.0.80.0110.00316.70
8.0.70.0080.00016.56
8.0.60.0000.00716.64
8.0.50.0000.00716.79
8.0.30.0090.01016.91
8.0.20.0130.00516.79
8.0.10.0000.00716.84
8.0.00.0080.01516.64
7.4.330.0050.00012.95
7.4.320.0000.00716.49
7.4.300.0030.00316.46
7.4.290.0000.00716.39
7.4.280.0040.00416.47
7.4.270.0110.00016.53
7.4.260.0000.00513.23
7.4.250.0000.00816.44
7.4.240.0070.00016.47
7.4.230.0070.00016.38
7.4.220.0030.01916.48
7.4.210.0070.01016.47
7.4.200.0000.00816.22
7.4.190.0070.00016.45
7.4.160.0100.00516.56
7.4.150.0150.00316.61
7.4.140.0120.01116.44
7.4.130.0100.00816.44
7.4.120.0120.00816.36
7.4.110.0030.01316.27
7.4.100.0070.01016.26
7.4.90.0120.00616.39
7.4.80.0100.00716.50
7.4.70.0060.01216.43
7.4.60.0110.00616.11
7.4.50.0000.00716.14
7.4.40.0040.01116.13
7.4.30.0120.00416.27
7.4.00.0030.01214.86
7.3.330.0060.00012.96
7.3.320.0060.00013.05
7.3.310.0070.00016.16
7.3.300.0000.00716.04
7.3.290.0030.01016.09
7.3.280.0120.00616.17
7.3.270.0120.00816.21
7.3.260.0070.01016.31
7.3.250.0100.00816.31
7.3.240.0060.01016.40
7.3.230.0160.00316.32
7.3.210.0080.00816.13
7.3.200.0150.00419.39
7.3.190.0120.00616.42
7.3.180.0100.00716.44
7.3.170.0120.00916.37
7.3.160.0100.00616.18
7.3.120.0030.01214.63
7.2.330.0090.00816.20
7.2.320.0100.01016.56
7.2.310.0110.00716.49
7.2.300.0100.00716.37
7.2.290.0070.01016.35
7.2.00.0220.00719.22
7.1.200.0100.00415.24
7.1.100.0060.00617.89
7.1.70.0030.01016.97
7.1.60.0070.01719.40
7.1.50.0090.01316.64
7.1.00.0030.06722.35
7.0.200.0030.00316.59
7.0.140.0030.07322.18
7.0.120.0070.07022.18
7.0.60.0030.07321.75
7.0.50.0130.07317.86
7.0.40.0070.09020.11
7.0.30.0400.07020.12
7.0.20.0230.08720.24
7.0.10.0000.04720.15
7.0.00.0100.08320.18
5.6.210.0070.03720.76
5.6.200.0000.04318.21
5.6.190.0000.07720.33
5.6.180.0200.04320.41
5.6.170.0200.04320.57
5.6.160.0100.05020.43
5.6.150.0030.05018.34
5.6.140.0030.04318.12
5.6.130.0070.06318.26
5.6.120.0070.08021.15
5.6.110.0170.07320.97
5.6.100.0130.03721.01
5.6.90.0130.04720.98
5.6.80.0030.06020.41
5.5.350.0030.08320.36
5.5.340.0030.05018.08
5.5.330.0130.04720.37
5.5.320.0330.07720.34
5.5.310.0170.04720.37
5.5.300.0030.06318.05
5.5.290.0170.04317.98
5.5.280.0170.07020.82
5.5.270.0030.09320.77
5.5.260.0100.08320.88
5.5.250.0070.07720.67
5.5.240.0200.06320.18
5.4.450.0100.06719.20
5.4.440.0070.08019.30
5.4.430.0030.04319.34
5.4.420.0070.04319.57
5.4.410.0070.04319.07
5.4.400.0130.04019.12
5.4.390.0000.04319.08
5.4.380.0070.04719.08
5.4.370.0070.08019.24
5.4.360.0100.08018.99
5.4.350.0000.06019.16
5.4.340.0070.07018.96
5.4.320.0030.06319.24
5.4.310.0170.07019.14
5.4.300.0070.07719.23
5.4.290.0030.08319.14
5.4.280.0070.07318.97
5.4.270.0100.07018.92
5.4.260.0100.06718.87
5.4.250.0030.05719.14
5.4.240.0070.05319.27
5.4.230.0030.04719.16
5.4.220.0070.08018.95
5.4.210.0130.06019.20
5.4.200.0000.07318.96
5.4.190.0030.07019.13
5.4.180.0070.07319.23
5.4.170.0070.05319.11
5.4.160.0030.07318.84
5.4.150.0030.04719.13
5.4.140.0070.07316.34
5.4.130.0170.06316.50
5.4.120.0000.08316.38
5.4.110.0030.04316.39
5.4.100.0100.05016.30
5.4.90.0100.05316.29
5.4.80.0130.05016.38
5.4.70.0070.05716.36
5.4.60.0000.04016.32
5.4.50.0070.06016.49
5.4.40.0000.04016.44
5.4.30.0100.05716.36
5.4.20.0170.05316.26
5.4.10.0000.07016.44
5.4.00.0200.05715.83
5.3.290.0070.07714.82
5.3.280.0070.06014.61
5.3.270.0070.05714.66
5.3.260.0070.06314.67
5.3.250.0100.04714.64
5.3.240.0070.04314.68
5.3.230.0070.04314.61
5.3.220.0100.06714.58
5.3.210.0070.06314.57
5.3.200.0130.06314.63
5.3.190.0070.06314.61
5.3.180.0030.06014.57
5.3.170.0000.04014.73
5.3.160.0070.03714.56
5.3.150.0000.04714.60
5.3.140.0030.04314.49
5.3.130.0070.06014.58
5.3.120.0030.07314.61
5.3.110.0130.05714.60
5.3.100.0070.05713.97
5.3.90.0000.08014.07
5.3.80.0070.04713.95
5.3.70.0070.07014.19
5.3.60.0030.04714.01
5.3.50.0100.03313.92
5.3.40.0100.05013.92
5.3.30.0070.06313.87
5.3.20.0100.05713.62
5.3.10.0030.07713.67
5.3.00.0070.05013.70
5.2.170.0000.07011.32
5.2.160.0270.02711.21
5.2.150.0030.06311.17
5.2.140.0000.05311.11
5.2.130.0130.05711.11
5.2.120.0030.04311.17
5.2.110.0070.04311.25
5.2.100.0030.06011.16
5.2.90.0070.03311.11
5.2.80.0070.06011.25
5.2.70.0070.04311.10
5.2.60.0100.03710.98
5.2.50.0070.06011.03
5.2.40.0170.05011.04
5.2.30.0070.06011.04
5.2.20.0030.05310.98
5.2.10.0100.03710.84
5.2.00.0000.05010.88
5.1.60.0030.03310.05
5.1.50.0030.05710.16
5.1.40.0070.05710.02
5.1.30.0030.06010.51
5.1.20.0070.03710.36
5.1.10.0030.04310.05
5.1.00.0130.03310.10
5.0.50.0030.0408.55
5.0.40.0030.0338.42
5.0.30.0000.0378.39
5.0.20.0070.0238.36
5.0.10.0030.0338.36
5.0.00.0030.0308.36
4.4.90.0030.0308.38
4.4.80.0030.0278.38
4.4.70.0000.0238.38
4.4.60.0030.0208.38
4.4.50.0030.0378.38
4.4.40.0070.0508.38
4.4.30.0000.0308.38
4.4.20.0030.0378.38
4.4.10.0100.0178.38
4.4.00.0000.0378.38
4.3.110.0000.0338.38
4.3.100.0000.0308.38
4.3.90.0030.0278.36
4.3.80.0030.0278.36
4.3.70.0000.0278.36
4.3.60.0030.0338.36
4.3.50.0030.0178.36
4.3.40.0000.0238.36
4.3.30.0030.0178.36
4.3.20.0000.0178.36
4.3.10.0030.0138.36
4.3.00.0030.0138.36

preferences:
42.83 ms | 401 KiB | 5 Q