3v4l.org

run code in 300+ PHP versions simultaneously
<?php function http_response_codea($code = NULL) { if ($code !== NULL) { switch ($code) { case 100: $text = 'Continue'; break; case 101: $text = 'Switching Protocols'; break; case 200: $text = 'OK'; break; case 201: $text = 'Created'; break; case 202: $text = 'Accepted'; break; case 203: $text = 'Non-Authoritative Information'; break; case 204: $text = 'No Content'; break; case 205: $text = 'Reset Content'; break; case 206: $text = 'Partial Content'; break; case 300: $text = 'Multiple Choices'; break; case 301: $text = 'Moved Permanently'; break; case 302: $text = 'Moved Temporarily'; break; case 303: $text = 'See Other'; break; case 304: $text = 'Not Modified'; break; case 305: $text = 'Use Proxy'; break; case 400: $text = 'Bad Request'; break; case 401: $text = 'Unauthorized'; break; case 402: $text = 'Payment Required'; break; case 403: $text = 'Forbidden'; break; case 404: $text = 'Not Found'; break; case 405: $text = 'Method Not Allowed'; break; case 406: $text = 'Not Acceptable'; break; case 407: $text = 'Proxy Authentication Required'; break; case 408: $text = 'Request Time-out'; break; case 409: $text = 'Conflict'; break; case 410: $text = 'Gone'; break; case 411: $text = 'Length Required'; break; case 412: $text = 'Precondition Failed'; break; case 413: $text = 'Request Entity Too Large'; break; case 414: $text = 'Request-URI Too Large'; break; case 415: $text = 'Unsupported Media Type'; break; case 500: $text = 'Internal Server Error'; break; case 501: $text = 'Not Implemented'; break; case 502: $text = 'Bad Gateway'; break; case 503: $text = 'Service Unavailable'; break; case 504: $text = 'Gateway Time-out'; break; case 505: $text = 'HTTP Version not supported'; break; default: exit('Unknown http status code "' . htmlentities($code) . '"'); break; } $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'); header($protocol . ' ' . $code . ' ' . $text); $GLOBALS['http_response_code'] = $code; } else { $code = (isset($GLOBALS['http_response_code']) ? $GLOBALS['http_response_code'] : 200); } return $code; } echo http_response_codea(404);

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.0090.00616.38
8.3.50.0150.00421.21
8.3.40.0120.00318.66
8.3.30.0100.01019.13
8.3.20.0070.00020.34
8.3.10.0000.00821.91
8.3.00.0040.00417.63
8.2.180.0180.00416.75
8.2.170.0070.00722.96
8.2.160.0070.00720.53
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00421.00
8.2.110.0090.00022.26
8.2.100.0080.00418.28
8.2.90.0000.00719.26
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0060.00618.16
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0000.00818.04
8.2.20.0040.00417.71
8.2.10.0040.00418.12
8.2.00.0030.00518.27
8.1.280.0070.01425.92
8.1.270.0080.00020.42
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00021.91
8.1.230.0090.00319.11
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00917.23
8.1.190.0030.00517.35
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0070.00022.07
8.1.150.0040.00418.98
8.1.140.0000.00717.40
8.1.130.0000.00717.86
8.1.120.0050.00217.48
8.1.110.0030.00517.55
8.1.100.0040.00417.51
8.1.90.0030.00317.56
8.1.80.0050.00217.53
8.1.70.0000.00717.40
8.1.60.0050.00517.52
8.1.50.0050.00317.45
8.1.40.0040.00417.44
8.1.30.0050.00317.68
8.1.20.0070.00017.63
8.1.10.0000.00817.69
8.1.00.0000.00817.54
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.49
8.0.270.0050.00317.21
8.0.260.0030.00317.30
8.0.250.0070.00017.01
8.0.240.0030.00317.04
8.0.230.0040.00416.95
8.0.220.0030.00316.99
8.0.210.0030.00316.89
8.0.200.0000.00816.90
8.0.190.0070.00017.04
8.0.180.0040.00417.00
8.0.170.0000.00717.02
8.0.160.0000.00816.97
8.0.150.0070.00016.94
8.0.140.0000.00716.88
8.0.130.0040.00413.42
8.0.120.0000.00816.79
8.0.110.0000.00816.94
8.0.100.0000.00716.91
8.0.90.0040.00416.82
8.0.80.0000.01616.88
8.0.70.0000.00816.89
8.0.60.0000.00716.81
8.0.50.0040.00416.75
8.0.30.0160.00617.06
8.0.20.0110.00817.40
8.0.10.0050.00317.04
8.0.00.0050.01316.74
7.4.330.0000.00615.05
7.4.320.0040.00416.56
7.4.300.0060.00016.60
7.4.290.0030.00316.61
7.4.280.0030.00516.57
7.4.270.0030.00516.57
7.4.260.0050.00216.52
7.4.250.0030.00616.55
7.4.240.0050.00216.60
7.4.230.0000.00716.63
7.4.220.0060.01216.59
7.4.210.0100.00516.50
7.4.200.0030.00316.45
7.4.160.0100.01016.40
7.4.150.0040.01517.40
7.4.140.0140.00517.86
7.4.130.0140.00716.70
7.4.120.0100.00816.68
7.4.110.0070.01016.61
7.4.100.0130.00316.61
7.4.90.0130.00616.56
7.4.80.0100.00719.39
7.4.70.0120.01216.31
7.4.60.0070.01016.70
7.4.50.0000.00816.44
7.4.40.0130.00616.62
7.4.30.0170.00616.54
7.4.10.0120.00614.80
7.4.00.0090.01014.90
7.3.330.0070.00013.43
7.3.320.0030.00313.23
7.3.310.0030.00316.44
7.3.300.0070.00016.36
7.3.290.0060.01016.38
7.3.280.0090.00716.41
7.3.270.0080.00817.40
7.3.260.0110.00616.61
7.3.250.0120.00916.54
7.3.240.0090.00616.71
7.3.230.0000.01816.45
7.3.210.0100.00716.32
7.3.200.0000.02016.55
7.3.190.0070.00716.62
7.3.180.0060.00916.39
7.3.170.0000.01816.53
7.3.160.0100.00616.54
7.3.130.0080.00414.93
7.3.120.0070.00914.99
7.3.110.0070.01214.89
7.3.100.0050.01015.14
7.3.90.0000.01214.92
7.3.80.0030.00614.83
7.3.70.0030.00714.94
7.3.60.0030.01114.79
7.3.50.0070.00414.81
7.3.40.0090.00414.77
7.3.30.0050.00514.87
7.3.20.0060.00616.45
7.3.10.0060.00316.59
7.3.00.0050.00716.69
7.2.330.0100.01016.90
7.2.320.0060.01616.64
7.2.310.0130.00316.88
7.2.300.0190.00316.70
7.2.290.0110.01116.71
7.2.260.0030.01315.08
7.2.250.0070.01315.20
7.2.240.0050.01215.15
7.2.230.0040.00915.21
7.2.220.0030.01415.14
7.2.210.0060.01015.19
7.2.200.0050.00914.93
7.2.190.0030.01115.19
7.2.180.0060.00615.05
7.2.170.0020.01015.07
7.2.160.0090.00315.15
7.2.150.0040.01116.93
7.2.140.0030.00916.97
7.2.130.0000.01116.83
7.2.120.0040.01216.81
7.2.110.0000.01517.00
7.2.100.0030.00616.73
7.2.90.0130.00016.83
7.2.80.0100.00716.88
7.2.70.0090.00916.95
7.2.60.0040.00816.94
7.2.50.0100.00316.86
7.2.40.0000.01017.05
7.2.30.0030.00616.78
7.2.20.0100.00316.94
7.2.10.0070.00717.04
7.2.00.0060.01118.33
7.1.330.0060.00915.70
7.1.320.0030.00815.91
7.1.310.0100.00315.77
7.1.300.0070.00715.84
7.1.290.0030.00615.91
7.1.280.0030.00915.77
7.1.270.0040.01115.72
7.1.260.0070.00315.71
7.1.250.0060.00615.88
7.1.240.0000.01415.94
7.1.230.0070.01015.83
7.1.220.0000.01115.93
7.1.210.0040.00815.53
7.1.200.0050.00915.66
7.1.190.0090.00315.71
7.1.180.0000.00915.85
7.1.170.0090.00615.77
7.1.160.0030.01015.46
7.1.150.0060.00615.61
7.1.140.0060.00915.97
7.1.130.0100.00315.55
7.1.120.0000.00915.77
7.1.110.0060.00915.79
7.1.100.0040.00816.94
7.1.90.0030.01015.82
7.1.80.0130.00315.85
7.1.70.0020.01016.35
7.1.60.0090.01017.68
7.1.50.0070.01016.35
7.1.40.0110.00415.84
7.1.30.0100.00315.50
7.1.20.0000.01015.71
7.1.10.0060.00315.49
7.1.00.0080.03819.04
7.0.330.0000.01315.55
7.0.320.0070.00715.47
7.0.310.0030.01315.42
7.0.300.0060.00915.45
7.0.290.0090.00315.29
7.0.280.0120.00315.46
7.0.270.0100.00315.47
7.0.260.0040.00815.62
7.0.250.0040.01115.39
7.0.240.0030.01015.40
7.0.230.0040.00715.29
7.0.220.0000.01515.27
7.0.210.0090.00315.46
7.0.200.0050.00516.01
7.0.190.0030.01315.53
7.0.180.0060.00615.50
7.0.170.0000.01115.51
7.0.160.0040.00715.56
7.0.150.0070.00715.16
7.0.140.0000.01715.36
7.0.130.0030.00615.40
7.0.120.0000.01015.50
7.0.110.0080.00415.37
7.0.100.0080.00615.52
7.0.90.0060.00615.09
7.0.80.0090.00315.54
7.0.70.0030.01015.44
7.0.60.0070.03217.69
7.0.50.0050.02416.61
7.0.40.0020.03016.89
7.0.30.0270.04016.90
7.0.20.0170.04416.88
7.0.10.0170.04516.82
7.0.00.0090.02316.92
5.6.400.0060.00614.57
5.6.390.0070.00714.54
5.6.380.0110.00414.28
5.6.370.0100.00614.17
5.6.360.0100.00414.32
5.6.350.0070.00714.46
5.6.340.0070.01014.36
5.6.330.0140.00014.68
5.6.320.0070.00714.55
5.6.310.0040.00814.52
5.6.300.0040.01214.71
5.6.290.0070.00714.30
5.6.280.0080.03517.59
5.6.270.0070.00714.75
5.6.260.0030.01014.39
5.6.250.0030.01014.65
5.6.240.0100.00314.41
5.6.230.0030.01214.59
5.6.220.0040.00414.23
5.6.210.0050.04317.55
5.6.200.0080.03116.29
5.6.190.0070.02317.25
5.6.180.0120.02717.53
5.6.170.0200.04017.55
5.6.160.0020.03717.61
5.6.150.0050.02216.37
5.6.140.0040.04416.38
5.6.130.0040.03116.28
5.6.120.0050.05017.66
5.6.110.0100.04217.64
5.6.100.0070.02317.83
5.6.90.0070.05017.69
5.6.80.0030.02517.34
5.6.70.0030.00714.15
5.6.60.0040.01114.35
5.6.50.0030.00914.56
5.6.40.0030.01414.46
5.6.30.0090.00614.66
5.6.20.0000.01514.31
5.6.10.0070.01014.31
5.6.00.0030.00914.21
5.5.380.0040.00714.35
5.5.370.0060.00614.34
5.5.360.0070.00714.03
5.5.350.0050.03617.46
5.5.340.0050.04216.16
5.5.330.0010.04817.35
5.5.320.0180.02517.30
5.5.310.0150.01917.39
5.5.300.0070.04016.14
5.5.290.0030.02416.31
5.5.280.0030.02617.57
5.5.270.0030.02717.70
5.5.260.0070.04217.66
5.5.250.0030.04617.47
5.5.240.0160.03617.33
5.5.230.0040.00814.46
5.5.220.0030.00514.51
5.5.210.0060.00914.44
5.5.200.0060.00614.30
5.5.190.0120.00314.30
5.5.180.0110.00314.29
5.5.170.0060.00314.40
5.5.160.0060.01014.14
5.5.150.0140.00314.10
5.5.140.0030.01214.13
5.5.130.0060.00614.17
5.5.120.0090.00914.41
5.5.110.0120.00014.12
5.5.100.0000.01714.24
5.5.90.0030.00814.28
5.5.80.0030.00714.04
5.5.70.0040.01214.03
5.5.60.0080.00814.62
5.5.50.0030.00614.34
5.5.40.0110.00413.96
5.5.30.0040.00714.53
5.5.20.0070.01014.30
5.5.10.0030.00914.58
5.5.00.0030.00614.60
5.4.450.0350.02215.58
5.4.440.0200.02515.65
5.4.430.0120.01815.68
5.4.420.0100.03015.68
5.4.410.0080.02815.40
5.4.400.0070.03015.30
5.4.390.0100.02715.32
5.4.380.0030.03315.30
5.4.370.0070.03015.30
5.4.360.0050.02915.30
5.4.350.0120.02715.22
5.4.340.0070.03015.32
5.4.330.0060.00611.84
5.4.320.0070.03115.21
5.4.310.0110.02815.21
5.4.300.0070.02715.21
5.4.290.0030.03515.22
5.4.280.0120.02615.29
5.4.270.0100.03415.29
5.4.260.0070.02815.31
5.4.250.0030.03515.20
5.4.240.0100.02815.17
5.4.230.0090.03015.21
5.4.220.0120.02515.33
5.4.210.0030.03215.21
5.4.200.0070.02814.21
5.4.190.0090.02715.27
5.4.180.0030.03115.20
5.4.170.0030.03415.30
5.4.160.0070.02815.29
5.4.150.0100.02715.28
5.4.140.0070.03314.03
5.4.130.0080.03314.14
5.4.120.0060.03114.07
5.4.110.0050.02914.09
5.4.100.0090.03614.04
5.4.90.0090.02614.03
5.4.80.0060.03014.02
5.4.70.0020.03314.08
5.4.60.0010.03114.08
5.4.50.0070.02814.08
5.4.40.0120.02314.03
5.4.30.0080.03814.00
5.4.20.0070.02914.02
5.4.10.0110.02314.02
5.4.00.0070.03013.79
5.3.290.0170.04714.83
5.3.280.0130.04714.73
5.3.270.0130.04714.74
5.3.260.0100.05014.72
5.3.250.0030.05714.63
5.3.240.0030.05714.84
5.3.230.0100.05314.72
5.3.220.0170.04314.59
5.3.210.0170.04714.70
5.3.200.0130.04714.65
5.3.190.0130.05314.74
5.3.180.0200.04314.77
5.3.170.0070.06714.72
5.3.160.0070.05314.72
5.3.150.0030.05714.69
5.3.140.0030.06014.58
5.3.130.0170.06014.74
5.3.120.0170.04714.74
5.3.110.0070.05314.70
5.3.100.0130.04714.19
5.3.90.0130.04714.05
5.3.80.0070.05314.15
5.3.70.0070.05314.08
5.3.60.0100.06014.21
5.3.50.0100.05314.02
5.3.40.0070.05314.02
5.3.30.0070.05314.07
5.3.20.0070.05013.70
5.3.10.0100.04713.78
5.3.00.0100.04713.83
5.2.170.0030.04711.20
5.2.160.0000.04711.22
5.2.150.0130.03711.28
5.2.140.0070.04311.21
5.2.130.0100.04011.16
5.2.120.0030.04311.18
5.2.110.0030.04311.23
5.2.100.0170.03311.17
5.2.90.0100.05311.16
5.2.80.0030.04711.18
5.2.70.0030.04711.16
5.2.60.0170.04011.29
5.2.50.0000.05011.26
5.2.40.0100.03711.14
5.2.30.0070.04310.97
5.2.20.0030.04711.17
5.2.10.0070.04010.89
5.2.00.0070.04310.77
5.1.60.0070.04710.05
5.1.50.0130.03310.07
5.1.40.0100.03010.09
5.1.30.0070.04010.49
5.1.20.0070.03710.52
5.1.10.0070.04010.14
5.1.00.0030.03710.09
5.0.50.0030.0308.62
5.0.40.0000.0338.43
5.0.30.0070.0438.34
5.0.20.0000.0308.41
5.0.10.0070.0278.40
5.0.00.0070.0438.40
4.4.90.0030.0205.96
4.4.80.0070.0205.96
4.4.70.0000.0235.95
4.4.60.0070.0206.03
4.4.50.0070.0205.93
4.4.40.0070.0335.98
4.4.30.0000.0235.95
4.4.20.0070.0176.02
4.4.10.0030.0205.99
4.4.00.0070.0305.98
4.3.110.0000.0235.99
4.3.100.0000.0235.95
4.3.90.0000.0235.81
4.3.80.0030.0375.92
4.3.70.0000.0235.84
4.3.60.0030.0235.83
4.3.50.0000.0275.85
4.3.40.0000.0375.79
4.3.30.0000.0234.61
4.3.20.0030.0204.63
4.3.10.0030.0234.64
4.3.00.0030.01715.70

preferences:
56.59 ms | 401 KiB | 5 Q