3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($str) { if (ltrim($str, 'A..Za..z0..9.') !== '') { return 'found a bad character'; } else { return 'all good'; } } foreach (['good', 'b@d', '$รท*'] as $s) { printf("%s : %s\n", $s, test($s)); }

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.140.0160.00817.23
8.4.130.0110.00918.41
8.4.120.0100.01020.69
8.4.110.0040.00522.34
8.4.100.0110.00918.39
8.4.90.0110.00918.69
8.4.80.0010.00817.56
8.4.70.0050.00617.90
8.4.60.0120.00518.67
8.4.50.0120.01017.65
8.4.40.0100.01020.44
8.4.30.0120.00618.87
8.4.20.0130.00622.25
8.4.10.0140.00723.57
8.3.270.0100.01516.55
8.3.260.0080.00616.66
8.3.250.0120.00618.60
8.3.240.0100.01020.67
8.3.230.0070.00316.21
8.3.220.0110.00818.84
8.3.210.0020.00616.48
8.3.200.0100.00916.55
8.3.190.0050.00519.09
8.3.180.0060.00216.41
8.3.170.0130.00718.94
8.3.160.0110.00718.57
8.3.150.0160.00318.66
8.3.140.0000.00918.27
8.3.130.0040.00418.38
8.3.120.0090.00018.88
8.3.110.0080.00820.94
8.3.100.0000.00824.06
8.3.90.0000.00926.77
8.3.80.0100.00018.05
8.3.70.0110.00316.38
8.3.60.0140.00718.18
8.3.50.0140.00416.39
8.3.40.0140.00719.96
8.3.30.0070.00718.72
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0130.00520.21
8.2.280.0070.01118.48
8.2.270.0000.00816.37
8.2.260.0060.01218.76
8.2.250.0110.00716.32
8.2.240.0150.00017.01
8.2.230.0000.00922.58
8.2.220.0160.00337.54
8.2.210.0090.00026.77
8.2.200.0050.00518.04
8.2.190.0130.00716.58
8.2.180.0140.00716.32
8.2.170.0100.00318.96
8.2.160.0130.00322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0070.00021.00
8.2.110.0080.00022.22
8.2.100.0080.00418.86
8.2.90.0040.00417.63
8.2.80.0040.00419.04
8.2.70.0000.00817.50
8.2.60.0050.00517.38
8.2.50.0140.00919.52
8.2.40.0120.00619.52
8.2.30.0110.00719.52
8.2.20.0120.00619.52
8.2.10.0070.01119.52
8.2.00.0080.01119.52
8.1.330.0120.00822.03
8.1.320.0130.00615.98
8.1.310.0040.00416.70
8.1.300.0040.00418.61
8.1.290.0090.00330.84
8.1.280.0140.00725.92
8.1.270.0000.00923.79
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00422.33
8.1.230.0110.00019.07
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0070.00317.25
8.1.190.0050.00317.10
8.1.180.0070.01019.52
8.1.170.0120.00419.52
8.1.160.0150.00319.52
8.1.150.0190.00019.52
8.1.140.0070.01019.52
8.1.130.0090.00919.52
8.1.120.0140.00519.52
8.1.110.0120.00819.52
8.1.100.0210.00019.52
8.1.90.0140.00519.52
8.1.80.0150.00519.52
8.1.70.0150.00319.52
8.1.60.0160.00419.52
8.1.50.0110.00819.52
8.1.40.0170.00319.52
8.1.30.0060.01219.52
8.1.20.0160.00419.52
8.1.10.0130.00419.52
8.1.00.0180.00019.52
8.0.300.0040.00719.52
8.0.290.0000.00716.63
8.0.280.0120.00619.52
8.0.270.0120.00619.52
8.0.260.0130.00419.52
8.0.250.0090.00919.52
8.0.240.0160.00019.52
8.0.230.0190.00019.52
8.0.220.0130.00419.52
8.0.210.0100.01019.52
8.0.200.0070.01119.52
8.0.190.0160.00419.52
8.0.180.0110.00719.52
8.0.170.0090.00919.52
8.0.160.0100.00719.52
8.0.150.0150.00419.52
8.0.140.0180.00019.52
8.0.130.0080.00819.52
8.0.120.0100.00719.52
8.0.110.0110.00719.52
8.0.100.0150.00419.52
8.0.90.0090.00719.52
8.0.80.0090.00919.52
8.0.70.0120.00819.52
8.0.60.0100.01019.52
8.0.50.0220.00019.52
8.0.30.0130.00419.52
8.0.20.0190.00019.52
8.0.10.0040.01519.52

preferences:
78.9 ms | 403 KiB | 5 Q