3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = <<<CODE ff\\bunction f() {} CODE; $funcs_internal = get_defined_functions()['internal']; /* lets allow some secure funcs here */ unset ($funcs_internal[array_search('strlen', $funcs_internal)]); unset ($funcs_internal[array_search('print', $funcs_internal)]); unset ($funcs_internal[array_search('strcmp', $funcs_internal)]); unset ($funcs_internal[array_search('strncmp', $funcs_internal)]); $funcs_extra = array ('eval', 'include', 'require', 'function'); $funny_chars = array ('\.', '\+', '-', '\*', '"', '`', '\[', '\]'); $variables = array ('_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_FILES', '_ENV', 'HTTP_ENV_VARS', '_SESSION', 'GLOBALS'); $blacklist = array_merge($funcs_internal, $funcs_extra, $funny_chars, $variables); $insecure = false; foreach ($blacklist as $blacklisted) { if (preg_match ('/' . $blacklisted . '/im', $code)) { $insecure = $blacklisted; break; } } if ($insecure) { var_dump($insecure); } else { eval ($code); }

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.4.120.0060.01225.96
8.4.110.0120.01520.40
8.4.100.0110.01719.94
8.4.90.0070.00919.75
8.4.80.0050.01419.91
8.4.70.0110.02219.68
8.4.60.0070.01120.70
8.4.50.0140.02220.55
8.4.40.0170.02321.44
8.4.30.0160.01619.59
8.4.20.0070.02219.74
8.4.10.0140.01419.62
8.3.250.0140.02218.78
8.3.240.0100.01019.08
8.3.230.0150.01919.02
8.3.220.0040.01019.47
8.3.210.0140.02218.81
8.3.200.0050.01119.12
8.3.190.0050.01119.25
8.3.180.0100.02520.25
8.3.170.0070.00719.50
8.3.160.0070.02918.88
8.3.150.0100.02722.68
8.3.140.0160.01321.01
8.3.130.0060.00920.30
8.3.120.0140.02421.21
8.3.110.0130.01620.94
8.3.100.0100.00720.43
8.3.90.0100.01026.77
8.3.80.0090.00918.75
8.3.70.0160.01320.45
8.3.60.0060.02220.43
8.3.50.0190.01823.04
8.3.40.0130.01620.96
8.3.30.0170.02020.95
8.3.20.0080.00823.85
8.3.10.0060.00923.79
8.3.00.0000.01621.62
8.2.290.0110.01822.08
8.2.280.0090.01420.37
8.2.270.0200.01719.02
8.2.260.0110.00418.70
8.2.250.0260.00620.46
8.2.240.0040.01219.08
8.2.230.0190.01622.58
8.2.220.0060.00924.06
8.2.210.0040.01126.77
8.2.200.0100.01018.75
8.2.190.0070.02518.50
8.2.180.0190.02518.75
8.2.170.0070.02122.96
8.2.160.0100.01723.88
8.2.150.0070.00724.18
8.2.140.0000.01624.66
8.2.130.0190.00326.16
8.2.120.0060.00922.87
8.2.110.0030.01322.73
8.2.100.0070.01622.27
8.2.90.0000.01821.40
8.2.80.0000.01819.80
8.2.70.0040.01619.68
8.2.60.0040.01519.78
8.2.50.0070.01119.63
8.2.40.0100.00722.51
8.2.30.0030.01421.23
8.2.20.0040.01520.00
8.2.10.0000.01720.00
8.2.00.0000.01719.85
8.1.330.0160.02024.20
8.1.320.0160.02118.59
8.1.310.0100.01918.54
8.1.300.0130.01622.02
8.1.290.0080.01230.84
8.1.280.0190.02625.92
8.1.270.0060.00923.82
8.1.260.0060.00926.35
8.1.250.0040.01128.09
8.1.240.0040.01224.02
8.1.230.0090.01222.48
8.1.220.0040.01419.78
8.1.210.0000.01919.25
8.1.200.0100.01019.48
8.1.190.0070.01119.48
8.1.180.0060.01219.53
8.1.170.0030.01620.70
8.1.160.0000.01720.91
8.1.150.0030.01423.79
8.1.140.0000.01721.60
8.1.130.0030.01621.05
8.1.120.0000.01719.51
8.1.110.0060.01319.59
8.1.100.0040.01519.50
8.1.90.0030.01519.64
8.1.80.0000.01819.58
8.1.70.0000.01819.65
8.1.60.0030.01619.75
8.1.50.0040.01619.64
8.1.40.0030.01619.68
8.1.30.0030.01619.65
8.1.20.0030.01519.76
8.1.10.0060.01319.63
8.1.00.0140.00719.66
8.0.300.0120.00621.63
8.0.290.0030.01418.75
8.0.280.0030.01320.18
8.0.270.0000.01718.99
8.0.260.0000.01719.07
8.0.250.0070.01019.01
8.0.240.0000.01718.86
8.0.230.0030.01419.06
8.0.220.0040.01418.91
8.0.210.0000.01718.95
8.0.200.0060.01618.83
8.0.190.0000.01918.84
8.0.180.0040.01419.02
8.0.170.0000.01818.86
8.0.160.0030.01518.86
8.0.150.0030.01418.82
8.0.140.0030.01618.93
8.0.130.0000.01415.11
8.0.120.0030.01618.87
8.0.110.0000.01718.75
8.0.100.0000.01818.73
8.0.90.0110.00718.78
8.0.80.0160.02618.84
8.0.70.0040.01418.88
8.0.60.0040.01418.95
8.0.50.0000.01818.83
8.0.30.0120.02218.97
8.0.20.0100.03319.17
8.0.10.0060.01318.86
8.0.00.0170.04118.69
7.4.330.0040.00816.34
7.4.320.0000.01618.45
7.4.300.0030.01418.54
7.4.290.0040.01418.50
7.4.280.0060.01318.51
7.4.270.0000.01718.61
7.4.260.0030.02018.55
7.4.250.0000.01818.54
7.4.240.0000.01718.54
7.4.230.0070.01018.42
7.4.220.0160.02518.64
7.4.210.0060.02818.59
7.4.200.0090.00918.71
7.4.160.0160.02118.53
7.4.150.0230.03618.63
7.4.140.0150.02918.65
7.4.130.0150.02418.58
7.4.120.0100.04318.72
7.4.110.0120.03118.37
7.4.100.0130.03218.57
7.4.90.0190.01918.50
7.4.80.0100.04219.39
7.4.70.0170.02118.33
7.4.60.0030.03318.53
7.4.50.0070.02018.33
7.4.40.0090.02918.19
7.4.30.0260.02318.60
7.4.00.0040.02516.94
7.3.330.0000.01315.11
7.3.320.0000.01415.19
7.3.310.0070.01318.40
7.3.300.0090.00918.50
7.3.290.0120.02818.51
7.3.280.0120.02918.41
7.3.270.0110.03018.66
7.3.260.0130.02618.63
7.3.250.0150.02818.52
7.3.240.0080.03018.72
7.3.230.0130.02718.79
7.3.210.0070.03318.47
7.3.200.0220.03218.63
7.3.190.0070.03018.61
7.3.180.0030.03418.70
7.3.170.0130.02618.70
7.3.160.0200.02018.56
7.3.10.0090.01818.78
7.3.00.0070.01718.79
7.2.330.0160.02318.90
7.2.320.0130.03918.72
7.2.310.0100.02719.11
7.2.300.0130.02619.06
7.2.290.0100.04619.06
7.2.130.0100.01319.08
7.2.120.0060.02219.16
7.2.110.0060.02118.91
7.2.100.0130.01719.04
7.2.90.0090.02218.94
7.2.80.0090.02219.00
7.2.70.0100.01819.18
7.2.60.0240.01119.12
7.2.50.0200.01619.17
7.2.40.0120.01819.23
7.2.30.0090.01919.19
7.2.20.0120.01819.09
7.2.10.0210.01019.05
7.2.00.0090.02020.00
7.1.250.0100.01317.84
7.1.230.0420.01717.99
7.1.220.0080.01917.80
7.1.210.0160.00817.96
7.1.200.0110.01517.94
7.1.190.0070.01917.96
7.1.180.0170.01017.93
7.1.170.0160.01217.73
7.1.160.0190.02317.74
7.1.150.0190.01618.01
7.1.140.0170.01417.55
7.1.130.0070.02118.03
7.1.120.0160.01317.69
7.1.110.0080.01717.67
7.1.100.0100.01619.11
7.1.90.0080.02017.75
7.1.80.0320.01617.94
7.1.70.0050.01618.64
7.1.60.0130.01818.88
7.1.50.0140.02018.60
7.1.40.0170.01518.11
7.1.30.0160.02317.79
7.1.20.0140.01418.04
7.1.10.0160.04321.06
7.1.00.0090.04621.22
7.0.310.0160.02317.51
7.0.300.0210.01217.44
7.0.290.0160.01917.62
7.0.280.0130.01917.32
7.0.270.0090.01517.34
7.0.260.0090.01617.32
7.0.250.0210.00717.51
7.0.240.0110.01417.43
7.0.230.0160.01317.50
7.0.220.0210.00917.21
7.0.210.0090.01917.70
7.0.200.0050.02418.39
7.0.190.0060.01917.66
7.0.180.0080.02017.38
7.0.170.0080.01717.39
7.0.160.0040.02217.55
7.0.150.0130.04120.64
7.0.140.0120.04420.86
7.0.130.0120.04120.70
7.0.120.0070.04520.62
7.0.110.0090.05820.78
7.0.100.0390.04520.67
7.0.90.0100.04620.61
7.0.80.0120.04320.68
7.0.70.0360.04120.74
7.0.60.0060.04820.55
7.0.50.0110.04620.79
7.0.40.0160.03719.71
7.0.30.0090.04419.73
7.0.20.0050.04819.71
7.0.10.0050.05019.74
7.0.00.0150.04019.66
5.6.380.0120.00815.13

preferences:
342.2 ms | 403 KiB | 5 Q