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_encode($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.3.120.0040.00720.82
8.3.110.0360.00716.30
8.3.100.0460.00816.27
8.3.90.0430.00716.45
8.3.80.0400.01316.38
8.3.70.0500.00416.50
8.3.60.0490.00316.63
8.3.50.0420.01016.25
8.3.40.0360.01517.22
8.3.30.0380.00317.13
8.3.20.0290.00617.13
8.3.10.0330.00617.46
8.3.00.0180.00417.63
8.2.240.0050.00318.96
8.2.230.0240.00816.54
8.2.220.0290.00916.54
8.2.210.0290.01016.70
8.2.200.0360.00716.63
8.2.190.0380.00616.75
8.2.180.0330.00716.75
8.2.170.0470.00317.84
8.2.160.0270.01718.00
8.2.150.0310.01417.46
8.2.140.0340.01017.85
8.2.130.0350.00917.75
8.2.120.0390.00617.63
8.2.110.0390.00418.00
8.2.100.0270.01517.88
8.2.90.0230.01217.88
8.2.80.0370.00417.63
8.2.70.0420.00417.25
8.2.60.0470.00917.63
8.2.50.0360.01117.75
8.2.40.0310.00718.00
8.2.30.0360.00417.63
8.2.20.0340.00917.75
8.2.10.0330.00618.00
8.2.00.0400.00017.75
8.1.300.0080.00018.48
8.1.290.0290.01416.13
8.1.280.0340.00716.13
8.1.270.0310.00017.44
8.1.260.0280.01317.25
8.1.250.0270.01017.61
8.1.240.0320.00717.48
8.1.230.0310.00817.25
8.1.220.0350.00417.48
8.1.210.0390.00717.24
8.1.200.0240.01717.48
8.1.190.0210.01717.38
8.1.180.0300.00317.10
8.1.170.0200.01217.34
8.1.160.0240.00917.38
8.1.150.0300.00917.38
8.1.140.0330.00017.25
8.1.130.0320.00717.50
8.1.120.0200.02017.36
8.1.110.0340.00417.47
8.1.100.0160.00317.38
8.1.90.0280.00917.23
8.1.80.0260.01817.11
8.1.70.0300.00317.25
8.1.60.0380.01517.13
8.1.50.0380.01017.50
8.1.40.0330.00317.63
8.1.30.0300.01317.63
8.1.20.0200.00017.50
8.1.10.0280.01517.38
8.1.00.0210.01417.38

preferences:
24.52 ms | 403 KiB | 5 Q