3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "i want to convert this string to the following"; echo preg_replace_callback('/\b\w(?:\w{1,2}\b)?/', fn($m) => strtoupper($m[0]), $string);

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.00.0120.00920.31
8.4.150.0020.00014.05
8.4.140.0180.01117.73
8.4.130.0070.00417.91
8.4.120.0110.00822.73
8.4.110.0070.00718.88
8.4.100.0060.00618.84
8.4.90.0140.00818.92
8.4.80.0110.00818.70
8.4.70.0120.00918.32
8.4.60.0090.01220.53
8.4.50.0140.00618.78
8.4.40.0060.00319.70
8.4.30.0100.01018.86
8.4.20.0080.00819.89
8.4.10.0110.00719.52
8.3.280.0070.01218.63
8.3.270.0090.01016.80
8.3.260.0110.00816.66
8.3.250.0130.00718.76
8.3.240.0130.00616.70
8.3.230.0120.00816.79
8.3.220.0110.00718.87
8.3.210.0070.01318.57
8.3.200.0050.00516.93
8.3.190.0100.00917.17
8.3.180.0090.00916.93
8.3.170.0140.00420.47
8.3.160.0110.00716.70
8.3.150.0120.00617.10
8.3.140.0080.00020.73
8.3.130.0080.00016.66
8.3.120.0090.00618.97
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0080.00326.77
8.3.80.0060.00317.97
8.3.70.0100.00718.43
8.3.60.0140.00716.58
8.3.50.0070.00716.70
8.3.40.0070.01322.08
8.3.30.0080.00818.92
8.3.20.0040.01121.68
8.3.10.0060.00921.91
8.3.00.0060.00919.20
8.2.290.0050.00420.59
8.2.280.0050.00518.62
8.2.270.0150.00417.21
8.2.260.0060.01217.04
8.2.250.0000.00817.11
8.2.240.0130.00617.34
8.2.230.0110.00822.58
8.2.220.0000.00837.54
8.2.210.0040.01126.77
8.2.200.0060.00316.75
8.2.190.0070.01116.58
8.2.180.0150.00616.75
8.2.170.0160.00319.14
8.2.160.0120.00418.91
8.2.150.0000.01619.02
8.2.140.0120.00320.35
8.2.130.0090.00620.43
8.2.120.0110.00419.22
8.2.110.0100.00319.52
8.2.100.0120.00419.32
8.2.90.0090.00618.85
8.2.80.0090.00619.42
8.2.70.0120.00418.84
8.2.60.0030.01318.83
8.2.50.0090.00619.00
8.2.40.0090.00618.91
8.2.30.0040.01118.97
8.2.20.0090.00618.79
8.2.10.0120.00418.71
8.2.00.0060.01018.86
8.1.330.0100.00922.20
8.1.320.0030.00516.42
8.1.310.0100.00718.74
8.1.300.0040.00818.17
8.1.290.0060.00330.84
8.1.280.0120.00625.92
8.1.270.0150.00021.93
8.1.260.0070.01021.91
8.1.250.0120.00322.05
8.1.240.0040.01118.75
8.1.230.0100.01018.76
8.1.220.0120.00318.99
8.1.210.0100.00718.68
8.1.200.0030.01318.54
8.1.190.0120.00318.52
8.1.180.0140.00318.58
8.1.170.0080.00818.63
8.1.160.0130.00318.78
8.1.150.0070.00718.86
8.1.140.0150.00018.59
8.1.130.0040.01118.83
8.1.120.0070.01018.75
8.1.110.0090.00618.73
8.1.100.0100.00719.91
8.1.90.0040.01418.61
8.1.80.0060.01019.82
8.1.70.0060.00918.68
8.1.60.0040.01118.85
8.1.50.0140.00318.80
8.1.40.0190.00918.77
8.1.30.0100.01018.90
8.1.20.0120.00319.94
8.1.10.0070.01018.84
8.1.00.0090.00618.61

preferences:
33.29 ms | 403 KiB | 5 Q