3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "NEW APPLE IPHONE X 64GB CVX-Dk46"; $arr = explode(" ", $str); foreach($arr as &$word){ //var_dump(preg_match("/\d/", $word)); if(!preg_match("/\d/", $word)){ $word = ucwords(strtolower($word)); } } echo implode(" ", $arr);

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.0140.00422.55
8.4.110.0090.01222.64
8.4.100.0120.00917.82
8.4.90.0110.01018.71
8.4.80.0060.00317.76
8.4.70.0050.00318.04
8.4.60.0140.00918.90
8.4.50.0050.00322.47
8.4.40.0150.00617.78
8.4.30.0070.01317.54
8.4.20.0040.01120.36
8.4.10.0130.00319.71
8.3.250.0080.00919.11
8.3.240.0050.00416.62
8.3.230.0120.00616.73
8.3.220.0070.00316.97
8.3.210.0120.00516.64
8.3.200.0030.00616.79
8.3.190.0140.00916.65
8.3.180.0130.00616.42
8.3.170.0070.00416.85
8.3.160.0030.01619.91
8.3.150.0080.00017.21
8.3.140.0100.00717.27
8.3.130.0080.01118.25
8.3.120.0060.00320.59
8.3.110.0060.00616.82
8.3.100.0050.00518.60
8.3.90.0110.00726.77
8.3.80.0040.00716.75
8.3.70.0100.00716.75
8.3.60.0110.00716.63
8.3.50.0080.01018.22
8.3.40.0140.00018.84
8.3.30.0190.00318.79
8.3.20.0040.00421.85
8.3.10.0080.00421.84
8.3.00.0040.00417.75
8.2.290.0030.00820.52
8.2.280.0110.00918.55
8.2.270.0060.01319.19
8.2.260.0070.00716.65
8.2.250.0060.00318.42
8.2.240.0040.01216.63
8.2.230.0060.00320.94
8.2.220.0040.00424.06
8.2.210.0120.00926.77
8.2.200.0060.00318.66
8.2.190.0110.00717.00
8.2.180.0070.01125.92
8.2.170.0070.00718.92
8.2.160.0070.00722.96
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00418.03
8.2.120.0040.00426.35
8.2.110.0090.00020.33
8.2.100.0040.00817.97
8.2.90.0060.00317.87
8.2.80.0030.00517.97
8.2.70.0000.00818.05
8.2.60.0080.00017.97
8.2.50.0040.00418.10
8.2.40.0000.00920.61
8.2.30.0040.00419.13
8.2.20.0070.00018.02
8.2.10.0040.00419.20
8.2.00.0060.00318.00
8.1.330.0100.00921.81
8.1.320.0120.00716.08
8.1.310.0140.00318.38
8.1.300.0070.01018.04
8.1.290.0100.00030.84
8.1.280.0090.00625.92
8.1.270.0000.00822.11
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00617.48
8.1.230.0000.01322.50
8.1.220.0020.00517.79
8.1.210.0040.00418.82
8.1.200.0030.00617.47
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0040.00418.90
8.1.150.0060.00318.95
8.1.140.0060.00318.94
8.1.130.0000.00720.19
8.1.120.0030.00517.57
8.1.110.0000.00817.56
8.1.100.0000.00817.58
8.1.90.0100.00017.61
8.1.80.0050.00317.58
8.1.70.0000.00717.55
8.1.60.0050.00317.78
8.1.50.0070.00017.55
8.1.40.0090.00017.69
8.1.30.0050.00317.79
8.1.20.0030.00617.79
8.1.10.0040.00417.63
8.1.00.0090.00017.54
8.0.300.0060.00321.55
8.0.290.0000.00916.75
8.0.280.0000.00718.34
8.0.270.0000.00717.01
8.0.260.0030.00318.37
8.0.250.0000.00717.08
8.0.240.0000.00717.02
8.0.230.0000.00717.02
8.0.220.0000.00716.91
8.0.210.0000.00616.93
8.0.200.0000.00617.09
8.0.190.0040.00416.98
8.0.180.0030.00617.05
8.0.170.0040.00417.10
8.0.160.0040.00416.90
8.0.150.0060.00616.97
8.0.140.0070.00016.81
8.0.130.0030.00313.50
8.0.120.0000.00716.89
8.0.110.0050.00317.00
8.0.100.0000.00716.84
8.0.90.0040.00416.90
8.0.80.0030.01216.97
8.0.70.0050.00316.94
8.0.60.0040.00416.92
8.0.50.0050.00216.89
8.0.30.0070.01017.28
8.0.20.0060.01217.20
8.0.10.0000.00717.10
8.0.00.0100.01017.07
7.4.330.0020.00215.55
7.4.320.0030.00316.77
7.4.300.0000.00716.74
7.4.290.0000.00716.70
7.4.280.0060.00516.59
7.4.270.0000.00616.70
7.4.260.0030.00316.73
7.4.250.0070.00016.84
7.4.240.0030.00316.71
7.4.230.0050.00316.73
7.4.220.0040.00416.83
7.4.210.0060.01216.75
7.4.200.0000.00716.91
7.4.160.0100.00616.56
7.4.140.0120.00917.86
7.4.130.0150.00316.67
7.4.120.0090.00916.86
7.4.110.0130.00416.68
7.4.100.0090.01316.70
7.4.90.0120.00616.59
7.4.80.0070.01319.39
7.4.70.0070.01016.71
7.4.60.0050.01116.72
7.4.50.0070.00716.72
7.4.40.0120.00416.61
7.4.00.0140.00015.28
7.3.330.0000.00513.22
7.3.320.0050.00013.20
7.3.310.0030.00316.40
7.3.300.0000.00616.36
7.3.290.0030.00316.43
7.3.280.0060.00916.39
7.3.260.0150.00716.56
7.3.240.0080.01016.69
7.3.230.0120.00416.51
7.3.210.0100.00716.42
7.3.200.0030.01316.36
7.3.190.0170.00516.46
7.3.180.0150.00316.45
7.3.170.0130.00316.39
7.3.160.0060.01116.67
7.3.10.0430.00414.69
7.3.00.0430.00714.74
7.2.330.0060.01316.71
7.2.320.0070.01016.89
7.2.310.0100.00616.69
7.2.300.0080.00816.82
7.2.290.0080.00816.77
7.2.130.0390.00715.08
7.2.120.0420.00615.08
7.2.110.0330.00315.26
7.2.100.0300.00314.96
7.2.90.0340.00315.19
7.2.80.0390.00315.13
7.2.70.0360.00415.00
7.2.60.0340.00415.37
7.2.50.0400.00315.36
7.2.40.0230.00715.21
7.2.30.0360.00715.20
7.2.20.0390.00715.05
7.2.10.0210.01015.27
7.2.00.0420.01015.00
7.1.250.0370.00414.04

preferences:
28.97 ms | 403 KiB | 5 Q