3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeLowerCharBeforeUpperChar(string $input): string { $output = ''; $length = strlen($input); for ($offset = 0; $offset < $length; ++$offset) { $currentOrd = ord($input[$offset]); $nextOrd = ord($input[$offset + 1] ?? '_'); if ($currentOrd < 97 || $currentOrd > 122 || $nextOrd < 65 || $nextOrd > 90 ){ $output .= $input[$offset]; } } return $output; } echo removeLowerCharBeforeUpperChar('MickMacKusa');

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.5.10.0100.00916.74
8.5.00.0140.00719.91
8.4.160.0160.00623.85
8.4.150.0020.00014.05
8.4.140.0150.01217.35
8.4.130.0110.00917.82
8.4.120.0100.01020.40
8.4.110.0120.00818.53
8.4.100.0090.01118.71
8.4.90.0120.00718.74
8.4.80.0070.00319.64
8.4.70.0090.00718.01
8.4.60.0120.00718.85
8.4.50.0120.00820.32
8.4.40.0130.00319.41
8.4.30.0130.00620.36
8.4.20.0130.00618.58
8.4.10.0030.00619.20
8.3.280.0140.00718.34
8.3.270.0200.01116.44
8.3.260.0100.00816.66
8.3.250.0120.00617.21
8.3.240.0140.00516.64
8.3.230.0100.01016.64
8.3.220.0080.01117.43
8.3.210.0120.00818.72
8.3.200.0070.00116.55
8.3.190.0100.00817.12
8.3.180.0070.01016.76
8.3.170.0100.01017.10
8.3.160.0150.00418.90
8.3.150.0060.00316.48
8.3.140.0120.00316.48
8.3.130.0050.00318.49
8.3.120.0000.00720.71
8.3.110.0090.00020.94
8.3.100.0100.01024.06
8.3.90.0120.00626.77
8.3.80.0100.00016.75
8.3.70.0180.00016.62
8.3.60.0090.00916.63
8.3.50.0070.01018.26
8.3.40.0120.00318.83
8.3.30.0170.00018.70
8.3.20.0080.00024.18
8.3.10.0060.00924.66
8.3.00.0050.00326.16
8.2.290.0050.00420.56
8.2.280.0120.00618.30
8.2.270.0140.00417.26
8.2.260.0040.00417.38
8.2.250.0070.01316.55
8.2.240.0060.01317.21
8.2.230.0030.00722.58
8.2.220.0030.00637.54
8.2.210.0050.00226.77
8.2.200.0060.00316.63
8.2.190.0150.00616.75
8.2.180.0140.00725.92
8.2.170.0040.01219.04
8.2.160.0110.00422.96
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0100.00020.99
8.2.100.0090.00317.72
8.2.90.0050.00318.03
8.2.80.0080.00018.16
8.2.70.0000.00817.75
8.2.60.0050.00517.63
8.2.50.0040.00417.75
8.2.40.0040.00418.16
8.2.30.0040.00418.11
8.2.20.0030.00618.18
8.2.10.0000.00719.38
8.2.00.0000.00719.31
8.1.330.0130.00616.13
8.1.320.0120.00916.18
8.1.310.0050.00318.22
8.1.300.0040.00416.05
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0070.00023.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00722.60
8.1.230.0090.00320.84
8.1.220.0000.00717.74
8.1.210.0040.00418.89
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.67
8.1.160.0070.00018.94
8.1.150.0030.00918.95
8.1.140.0030.00318.88
8.1.130.0040.00420.10
8.1.120.0070.00017.48
8.1.110.0040.00417.35
8.1.100.0000.00717.36
8.1.90.0040.00417.41
8.1.80.0040.00417.36
8.1.70.0040.00417.46
8.1.60.0040.00417.62
8.1.50.0080.00017.61
8.1.40.0000.00717.41
8.1.30.0000.01117.48
8.1.20.0000.00817.65
8.1.10.0050.00217.51
8.1.00.0040.00417.52
8.0.300.0070.00020.03
8.0.290.0050.00316.75
8.0.280.0000.00718.51
8.0.270.0030.00317.91
8.0.260.0000.00618.32
8.0.250.0040.00416.96
8.0.240.0030.00316.85
8.0.230.0050.00317.00
8.0.220.0030.00316.89
8.0.210.0000.00716.76
8.0.200.0040.00416.82
8.0.190.0000.00816.92
8.0.180.0000.00716.92
8.0.170.0040.00416.80
8.0.160.0050.00216.81
8.0.150.0050.00316.82
8.0.140.0040.00416.91
8.0.130.0030.00313.36
8.0.120.0080.00016.88
8.0.110.0050.00316.87
8.0.100.0000.00716.69
8.0.90.0070.00016.80
8.0.80.0040.01116.84
8.0.70.0030.00616.79
8.0.60.0070.00016.79
8.0.50.0000.00816.70
8.0.30.0120.00916.86
8.0.20.0050.01116.97
8.0.10.0070.01017.02
8.0.00.0110.01017.03
7.4.330.0050.00015.55
7.4.320.0020.00516.54
7.4.300.0030.00316.47
7.4.290.0080.00016.36
7.4.280.0050.00316.50
7.4.270.0030.00316.50
7.4.260.0050.00013.24
7.4.250.0040.00416.46
7.4.240.0000.00716.58
7.4.230.0040.00416.58
7.4.220.0000.00716.43
7.4.210.0090.00516.60
7.4.200.0000.00716.25
7.4.160.0070.01116.56
7.4.150.0070.00916.58
7.4.140.0060.01416.45
7.4.130.0100.00716.45
7.4.120.0090.00716.45
7.4.110.0090.00916.46
7.4.100.0060.00916.61
7.4.90.0120.00416.55
7.4.80.0110.00616.44
7.4.70.0120.00416.43
7.4.60.0060.01116.40
7.4.50.0080.00616.24
7.4.40.0060.00916.46
7.4.30.0050.00916.47
7.4.20.0110.01016.40
7.4.10.0090.00816.54
7.4.00.0050.00916.48
7.3.330.0030.00316.37
7.3.320.0000.00513.32
7.3.310.0000.00816.39
7.3.300.0050.00216.42
7.3.290.0120.00716.36
7.3.270.0080.00716.38
7.3.260.0060.01016.37
7.3.250.0060.00916.32
7.3.240.0130.00816.37
7.3.230.0070.00716.33
7.3.220.0110.00316.30
7.3.210.0070.01016.31
7.3.200.0130.00516.28
7.3.190.0060.01416.29
7.3.180.0040.01016.38
7.3.170.0090.00516.28
7.3.160.0090.00516.26
7.3.150.0030.01416.28
7.3.140.0060.01016.33
7.3.130.0070.00816.27
7.3.120.0050.01016.24
7.3.110.0050.01116.21
7.3.100.0070.01016.20
7.3.90.0070.00916.50
7.3.80.0090.00716.28
7.3.70.0060.00916.40
7.3.60.0060.01116.43
7.3.50.0070.01016.45
7.3.40.0060.01116.43
7.3.30.0070.01016.45
7.3.20.0130.00616.55
7.3.10.0360.00816.43
7.3.00.0120.00816.41

preferences:
36.18 ms | 403 KiB | 5 Q