3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isReserved($string = '') { $reserved_pattern = "/\b((a(bstract|nd|rray|s))|(c(a(llable|se|tch)|l(ass|one)|on(st|tinue)))|(d(e(clare|fault)|ie|o))|(e(cho|lse(if)?|mpty|nd(declare|for(each)|if|switch|while)|val|x(it|tends)))|(f(inal|or(each)?|unction))|(g(lobal|oto))|(i(f|mplements|n(clude(_once)?|st(anceof|eadof)|terface)|sset))|(n(amespace|ew))|(p(r(i(nt|vate)|otected)|ublic))|(re(quire(_once)?|turn))|(s(tatic|witch))|(t(hrow|r(ait|y)))|(u(nset|se))|(__halt_compiler|break|list|(x)?or|var|while))\b/"; return preg_match($reserved_pattern, $string); } echo 'static'; echo PHP_EOL; echo isReserved('static'); echo PHP_EOL; echo PHP_EOL; echo 'hello'; echo PHP_EOL; echo isReserved('hello');

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.130.0110.00919.91
8.4.120.0070.00420.40
8.4.110.0100.01222.44
8.4.100.0090.00818.93
8.4.90.0110.01018.79
8.4.80.0040.00418.08
8.4.70.0050.00317.95
8.4.60.0090.01118.90
8.4.50.0120.00819.64
8.4.40.0080.00017.91
8.4.30.0100.01020.27
8.4.20.0140.00719.64
8.4.10.0060.01017.62
8.3.260.0130.00916.91
8.3.250.0040.00419.01
8.3.240.0140.00616.75
8.3.230.0060.00716.74
8.3.220.0110.00717.32
8.3.210.0120.00716.64
8.3.200.0030.00616.72
8.3.190.0090.00717.38
8.3.180.0110.00716.59
8.3.170.0060.00317.20
8.3.160.0040.00418.88
8.3.150.0100.00320.87
8.3.140.0060.00916.82
8.3.130.0070.00318.44
8.3.120.0090.00020.73
8.3.110.0040.00720.94
8.3.100.0090.00016.58
8.3.90.0100.00026.77
8.3.80.0050.00519.36
8.3.70.0130.00318.81
8.3.60.0140.00718.43
8.3.50.0100.00824.70
8.3.40.0080.00820.47
8.3.30.0070.00718.92
8.3.20.0050.00220.77
8.3.10.0000.00822.27
8.3.00.0040.00422.56
8.2.290.0050.00420.67
8.2.280.0050.00418.86
8.2.270.0070.00716.96
8.2.260.0090.00619.96
8.2.250.0060.01516.81
8.2.240.0090.00017.07
8.2.230.0110.00422.58
8.2.220.0030.00624.06
8.2.210.0080.00826.77
8.2.200.0060.00318.88
8.2.190.0110.01118.54
8.2.180.0120.00625.92
8.2.170.0140.00719.08
8.2.160.0100.00322.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0020.00526.16
8.2.110.0060.00322.35
8.2.100.0060.00617.97
8.2.90.0050.00318.16
8.2.80.0050.00319.27
8.2.70.0050.00317.88
8.2.60.0040.00418.00
8.2.50.0040.00418.00
8.2.40.0080.00019.47
8.2.30.0020.00519.24
8.2.20.0030.00618.05
8.2.10.0030.00619.30
8.2.00.0020.00519.31
8.1.330.0110.00722.22
8.1.320.0060.00316.49
8.1.310.0000.00816.56
8.1.300.0040.01220.09
8.1.290.0040.00730.84
8.1.280.0100.01325.92
8.1.270.0070.00020.87
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0000.01024.05
8.1.230.0080.00422.80
8.1.220.0000.00817.77
8.1.210.0050.00318.92
8.1.200.0070.00317.60
8.1.190.0030.00817.47
8.1.180.0080.00018.10
8.1.170.0090.00018.81
8.1.160.0070.00419.14
8.1.150.0040.00418.93
8.1.140.0040.00418.94
8.1.130.0000.00722.01
8.1.120.0000.00817.66
8.1.110.0080.00017.60
8.1.100.0000.00817.65
8.1.90.0020.00517.62
8.1.80.0040.00417.63
8.1.70.0000.00717.56
8.1.60.0000.00817.81
8.1.50.0030.00617.66
8.1.40.0060.00317.66
8.1.30.0000.00917.85
8.1.20.0060.00317.77
8.1.10.0030.00517.66
8.1.00.0040.00417.60
8.0.300.0080.00021.96
8.0.290.0000.00817.00
8.0.280.0030.00618.54
8.0.270.0040.00416.96
8.0.260.0000.00820.16
8.0.250.0000.00817.09
8.0.240.0040.00417.22
8.0.230.0050.00317.01
8.0.220.0000.00716.95
8.0.210.0030.00317.07
8.0.200.0000.00716.96
8.0.190.0040.00417.16
8.0.180.0050.00317.07
8.0.170.0030.00516.97
8.0.160.0040.00417.07
8.0.150.0000.00817.01
8.0.140.0030.00517.04
8.0.130.0000.00613.55
8.0.120.0050.00316.91
8.0.110.0040.00416.86
8.0.100.0040.00417.04
8.0.90.0040.00417.09
8.0.80.0150.00617.11
8.0.70.0000.00816.92
8.0.60.0090.00016.89
8.0.50.0050.00316.91
8.0.30.0090.01217.29
8.0.20.0080.01317.44
8.0.10.0000.00717.07
8.0.00.0120.00816.80
7.4.330.0030.00315.55
7.4.320.0030.00316.70
7.4.300.0040.00416.93
7.4.290.0000.00716.77
7.4.280.0030.00616.79
7.4.270.0030.00316.65
7.4.260.0030.00313.63
7.4.250.0040.00416.82
7.4.240.0020.00616.90
7.4.230.0040.00416.70
7.4.220.0010.00616.74
7.4.210.0140.00016.90
7.4.200.0050.00216.64
7.4.130.0070.01116.81
7.4.120.0070.01316.75
7.4.110.0150.00316.53
7.4.100.0090.00916.63
7.4.90.0090.00916.59
7.4.80.0080.01219.39
7.4.70.0170.00016.66
7.4.60.0070.01016.59
7.4.50.0030.00916.75
7.4.40.0080.00816.79
7.4.30.0150.00016.88
7.4.20.0100.00716.70
7.4.10.0060.01116.86
7.4.00.0060.01016.76
7.3.330.0030.00316.28
7.3.320.0030.00313.34
7.3.310.0050.00216.36
7.3.300.0050.00316.48
7.3.290.0100.01116.48
7.3.260.0100.00916.61
7.3.240.0080.01016.56
7.3.230.0160.00816.72
7.3.210.0040.01316.48
7.3.200.0120.00416.53
7.3.190.0060.01216.45
7.3.180.0090.00616.51
7.3.170.0130.00316.75
7.3.160.0090.00916.43
7.3.150.0100.00616.39
7.3.140.0030.01216.48
7.3.130.0110.00316.73
7.3.120.0070.01016.63
7.3.110.0060.01016.75
7.3.100.0100.00516.49
7.3.90.0100.00316.71
7.3.80.0000.01516.84
7.3.70.0090.00616.33
7.3.60.0120.00416.54
7.3.50.0070.00716.60
7.3.40.0060.01016.63
7.3.30.0040.01116.59
7.3.20.0080.00616.64
7.3.10.0040.01116.41
7.3.00.0040.01116.73
7.2.330.0030.01516.87
7.2.320.0040.01816.70
7.2.310.0030.01416.82
7.2.300.0070.01116.79
7.2.290.0130.00616.70
7.2.280.0030.01216.64
7.2.270.0030.01416.70
7.2.260.0090.00616.69
7.2.250.0040.01116.80
7.2.240.0110.00416.83
7.2.230.0060.00916.71
7.2.220.0090.00616.69
7.2.210.0030.01316.79
7.2.200.0060.01216.65
7.2.190.0030.01216.66
7.2.180.0100.00716.60
7.2.170.0120.00316.80
7.2.160.0090.00516.85
7.2.150.0060.00916.89
7.2.140.0060.01016.73
7.2.130.0070.01016.74
7.2.120.0150.00016.70
7.2.110.0070.00716.79
7.2.100.0090.00616.60
7.2.90.0170.00316.66
7.2.80.0100.01016.96
7.2.70.0120.00916.73
7.2.60.0160.00616.68
7.2.50.0130.01016.90
7.2.40.0030.01916.59
7.2.30.0120.00916.98
7.2.20.0090.00616.92
7.2.10.0090.00616.81
7.2.00.0070.00716.53

preferences:
28.4 ms | 403 KiB | 5 Q