3v4l.org

run code in 300+ PHP versions simultaneously
<?php $item = mb_convert_encoding( '¨l', 'ISO-8859-1', 'UTF-8' ); $encoding = 'UTF-8'; $ret = ''; $max = mb_strlen($item ?? '', $encoding); for ($i = 0; $i < $max; $i++) { $char = mb_substr($item, $i, 1, $encoding); $up = mb_strtoupper($char, $encoding); $low = mb_strtolower($char, $encoding); $ret .= ($up != $low) ? '[' . $up . $low . ']' : $char; } var_dump(utf8_decode($ret));

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.20.0100.01019.58
8.4.10.0100.01019.68
8.3.150.0100.01016.92
8.3.140.0150.00316.98
8.3.130.0060.00318.64
8.3.120.0090.00020.58
8.3.110.0320.00916.70
8.3.100.0430.00016.63
8.3.90.0430.00716.52
8.3.80.0470.00316.38
8.3.70.0340.01916.62
8.3.60.0400.00916.50
8.3.50.0340.01916.73
8.3.40.0340.00717.38
8.3.30.0290.00717.00
8.3.20.0240.00817.50
8.3.10.0380.01217.23
8.3.00.0120.01217.25
8.2.260.0100.00716.95
8.2.250.0080.00018.71
8.2.240.0030.00618.91
8.2.230.0330.00616.42
8.2.220.0280.00616.66
8.2.210.0250.00616.86
8.2.200.0340.00316.84
8.2.190.0260.01716.63
8.2.180.0320.00416.73
8.2.170.0240.01417.75
8.2.160.0300.01317.88
8.2.150.0370.00717.63
8.2.140.0350.01017.50
8.2.130.0470.00017.63
8.2.120.0170.00717.85
8.2.110.0250.00017.63
8.2.100.0230.00317.63
8.2.90.0290.00417.63
8.2.80.0230.00317.50
8.2.70.0140.01417.50
8.2.60.0210.00717.50
8.2.50.0280.00617.50
8.2.40.0120.00617.50
8.2.30.0190.00017.50
8.2.20.0140.00617.50
8.2.10.0160.00317.75
8.2.00.0200.00017.34
8.1.310.0070.01118.57
8.1.300.0150.00018.74
8.1.290.0160.00516.11
8.1.280.0150.00416.00
8.1.270.0100.00717.43
8.1.260.0120.00917.13
8.1.250.0220.00417.34
8.1.240.0100.01017.25
8.1.230.0190.00017.23
8.1.220.0150.00217.38
8.1.210.0110.00717.35
8.1.200.0090.00917.38
8.1.190.0200.00017.25
8.1.180.0140.00517.38
8.1.170.0150.00417.13
8.1.160.0110.00717.38
8.1.150.0100.00717.00
8.1.140.0100.00517.38
8.1.130.0090.00916.98
8.1.120.0130.00417.11
8.1.110.0150.00317.00
8.1.100.0140.00517.13
8.1.90.0140.00617.13
8.1.80.0130.00317.35
8.1.70.0180.00017.10
8.1.60.0170.00317.25
8.1.50.0200.00017.25
8.1.40.0080.00617.38
8.1.30.0140.00417.50
8.1.20.0160.00317.13
8.1.10.0140.00017.50
8.1.00.0190.00017.38

preferences:
35.94 ms | 403 KiB | 5 Q