3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'аяruski', 'string', '54345', 'é', 'аяruski foo', 'string foo', '54345 foo', 'é foo', ]; var_export( preg_replace_callback( '/^(.)(.*)/u', fn($m) => mb_strtoupper($m[1]) . mb_strtolower($m[2]), $tests ) );

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.120.0150.00520.84
8.4.110.0140.00620.30
8.4.100.0140.00617.66
8.4.90.0090.01218.77
8.4.80.0130.00817.87
8.4.70.0070.00118.78
8.4.60.0100.01118.63
8.4.50.0130.00919.75
8.4.40.0070.01317.89
8.4.30.0070.01120.70
8.4.20.0070.00319.78
8.4.10.0070.01319.52
8.3.250.0140.00619.00
8.3.240.0130.00617.05
8.3.230.0100.00916.79
8.3.220.0140.00517.32
8.3.210.0100.01216.71
8.3.200.0060.00316.84
8.3.190.0140.00717.20
8.3.180.0050.00316.71
8.3.170.0060.00317.37
8.3.160.0030.01518.43
8.3.150.0150.00416.84
8.3.140.0060.00318.93
8.3.130.0070.00318.55
8.3.120.0060.00618.87
8.3.110.0190.00416.57
8.3.100.0200.00316.38
8.3.90.0070.01516.64
8.3.80.0320.00416.50
8.3.70.0200.00816.63
8.3.60.0280.00316.37
8.3.50.0240.00816.38
8.3.40.0180.00917.25
8.3.30.0360.00417.37
8.3.20.0340.01117.75
8.3.10.0330.00317.75
8.3.00.0190.00419.25
8.2.290.0150.00420.50
8.2.280.0160.00320.40
8.2.270.0070.01016.88
8.2.260.0050.00316.54
8.2.250.0070.00016.75
8.2.240.0030.01619.15
8.2.230.0260.00616.90
8.2.220.0360.00016.24
8.2.210.0270.01216.14
8.2.200.0210.02116.23
8.2.190.0330.01016.74
8.2.180.0190.00516.68
8.2.170.0190.00317.88
8.2.160.0330.01017.63
8.2.150.0370.00717.63
8.2.140.0330.01317.59
8.2.130.0420.00817.62
8.2.120.0450.00017.63
8.2.110.0230.02017.73
8.2.100.0340.00917.50
8.2.90.0370.00617.75
8.2.80.0400.00317.63
8.2.70.0200.01717.75
8.2.60.0170.00317.63
8.2.50.0210.00417.72
8.2.40.0150.00317.88
8.2.30.0270.00717.63
8.2.20.0370.00817.50
8.2.10.0370.00417.38
8.2.00.0230.01717.59
8.1.330.0110.00821.79
8.1.320.0120.00718.10
8.1.310.0190.00016.53
8.1.300.0160.00318.26
8.1.290.0340.00916.13
8.1.280.0410.00016.25
8.1.270.0310.00817.39
8.1.260.0340.00817.50
8.1.250.0370.00717.38
8.1.240.0210.01117.25
8.1.230.0260.01217.24
8.1.220.0360.00717.38
8.1.210.0340.01117.35
8.1.200.0280.00617.25
8.1.190.0280.00917.23
8.1.180.0330.00617.11
8.1.170.0290.01017.46
8.1.160.0360.01017.50
8.1.150.0390.01117.35
8.1.140.0370.00317.50
8.1.130.0390.00017.59
8.1.120.0340.00617.38
8.1.110.0320.00717.59
8.1.100.0280.00617.50
8.1.90.0260.01317.48
8.1.80.0310.00917.59
8.1.70.0290.00717.38
8.1.60.0310.00717.24
8.1.50.0400.00317.63
8.1.40.0320.00817.38
8.1.30.0300.00717.59
8.1.20.0400.00717.75
8.1.10.0390.00617.35
8.1.00.0350.00917.34

preferences:
28.98 ms | 403 KiB | 5 Q