3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "test string", "lado lomidze needs a solution", "I made some research and found 'good' answers here; they really helped me." ]; // if not already all lowercase, use strtolower() var_export(preg_replace_callback('/\w.?/', function ($m) { return ucfirst($m[0]); }, $strings));

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.0030.00620.80
8.4.110.0130.00722.46
8.4.100.0110.00818.05
8.4.90.0120.00820.85
8.4.80.0120.00720.64
8.4.70.0090.01018.97
8.4.60.0140.00620.48
8.4.50.0100.00524.31
8.4.40.0030.01319.68
8.4.30.0040.00417.89
8.4.20.0130.00720.56
8.4.10.0090.00017.96
8.3.250.0090.00519.06
8.3.240.0160.00318.78
8.3.230.0120.00816.54
8.3.220.0040.00320.62
8.3.210.0030.00416.59
8.3.200.0030.00616.75
8.3.190.0040.00417.11
8.3.180.0110.00919.07
8.3.170.0080.00016.70
8.3.160.0110.00716.72
8.3.150.0080.01118.91
8.3.140.0030.00716.79
8.3.130.0040.00418.79
8.3.120.0160.00318.93
8.3.110.0030.00620.94
8.3.100.0040.00424.06
8.3.90.0050.00326.77
8.3.80.0060.00318.55
8.3.70.0150.00616.70
8.3.60.0060.01218.43
8.3.50.0090.00517.54
8.3.40.0110.00718.87
8.3.30.0070.01018.96
8.3.20.0000.00818.93
8.3.10.0080.00021.54
8.3.00.0080.00023.52
8.2.290.0110.00817.16
8.2.280.0090.00918.30
8.2.270.0110.01116.87
8.2.260.0080.00017.20
8.2.250.0040.00416.80
8.2.240.0090.00017.24
8.2.230.0030.00722.58
8.2.220.0030.00737.54
8.2.210.0000.00826.77
8.2.200.0070.00316.88
8.2.190.0000.01518.45
8.2.180.0070.00718.67
8.2.170.0000.01722.96
8.2.160.0110.00419.33
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0000.00819.13
8.2.110.0030.00721.17
8.2.100.0080.00418.03
8.2.90.0030.00618.03
8.2.80.0060.00318.03
8.2.70.0040.00418.05
8.2.60.0050.00318.09
8.2.50.0060.00318.10
8.2.40.0000.00821.05
8.2.30.0000.00720.74
8.2.20.0050.00318.06
8.2.10.0000.00819.80
8.2.00.0060.00318.10
8.1.330.0100.00921.93
8.1.320.0130.00617.83
8.1.310.0110.00418.64
8.1.300.0160.00018.41
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0030.01022.04
8.1.260.0030.00626.35
8.1.250.0090.00028.09
8.1.240.0090.00020.56
8.1.230.0040.00822.71
8.1.220.0080.00017.76
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0040.00418.37
8.1.160.0040.00418.84
8.1.150.0050.00218.84
8.1.140.0040.00418.88
8.1.130.0000.00820.20
8.1.120.0030.00617.62
8.1.110.0030.00317.50
8.1.100.0000.00717.62
8.1.90.0040.00417.63
8.1.80.0000.00817.59
8.1.70.0030.00317.66
8.1.60.0030.00517.77
8.1.50.0040.00417.66
8.1.40.0030.00617.73
8.1.30.0000.00817.86
8.1.20.0030.00517.82
8.1.10.0040.00417.69
8.1.00.0040.00417.62
8.0.300.0030.00520.07
8.0.290.0000.00816.75
8.0.280.0070.00018.46
8.0.270.0000.00717.23
8.0.260.0060.00020.27
8.0.250.0070.00017.07
8.0.240.0040.00417.11
8.0.230.0000.00817.06
8.0.220.0040.00416.96
8.0.210.0040.00416.86
8.0.200.0030.00317.10
8.0.190.0040.00417.10
8.0.180.0000.00816.99
8.0.170.0030.00617.05
8.0.160.0000.00716.98
8.0.150.0070.00016.99
8.0.140.0030.00617.02
8.0.130.0030.00313.37
8.0.120.0040.00416.94
8.0.110.0080.00016.91
8.0.100.0040.00416.95
8.0.90.0040.00416.88
8.0.80.0070.01017.03
8.0.70.0030.00517.06
8.0.60.0090.00017.00
8.0.50.0040.00417.00
8.0.30.0140.01617.29
8.0.20.0100.00917.40
8.0.10.0070.00017.20
8.0.00.0140.00516.86
7.4.330.0020.00215.55
7.4.320.0070.00016.74
7.4.300.0070.00016.81
7.4.290.0030.00516.82
7.4.280.0080.00016.67
7.4.270.0000.00816.86
7.4.260.0030.00516.83
7.4.250.0040.00416.60
7.4.240.0050.00216.88
7.4.230.0040.00416.80
7.4.220.0040.00416.52
7.4.210.0070.00916.74
7.4.200.0030.00316.57
7.4.160.0100.00716.67
7.4.140.0090.00917.86
7.4.130.0100.00716.66
7.4.120.0090.00816.64
7.4.110.0050.01116.57
7.4.100.0100.00716.80
7.4.90.0040.01516.54
7.4.80.0060.01019.39
7.4.70.0090.00916.79
7.4.60.0070.01016.69
7.4.50.0060.01016.52
7.4.40.0130.00716.73
7.4.10.0100.00715.03
7.4.00.0120.00515.03
7.3.330.0080.00013.32
7.3.320.0030.00313.21
7.3.310.0000.00716.48
7.3.300.0000.00716.47
7.3.290.0070.00716.42
7.3.280.0030.01016.40
7.3.260.0110.00816.54
7.3.240.0120.00616.65
7.3.230.0130.00616.65
7.3.210.0070.01116.59
7.3.200.0060.01016.49
7.3.190.0060.01616.68
7.3.180.0110.01116.55
7.3.170.0060.01116.43
7.3.160.0100.00616.52
7.3.130.0070.01014.93
7.3.120.0060.01214.73
7.3.110.0070.01115.04
7.3.100.0000.01714.89
7.3.90.0140.00314.71
7.3.80.0070.00314.75
7.3.70.0090.00614.91
7.3.60.0060.00914.95
7.3.50.0070.00714.93
7.3.40.0030.01014.79
7.3.30.0000.01114.79
7.3.20.0080.00416.60
7.3.10.0110.00416.77
7.3.00.0030.01016.97
7.2.330.0060.01316.71
7.2.320.0030.01516.80
7.2.310.0040.01316.55
7.2.300.0060.01216.78
7.2.290.0130.01016.74
7.2.260.0130.00715.05
7.2.250.0070.01115.00
7.2.240.0000.01215.17
7.2.230.0100.00714.92
7.2.220.0100.00615.07
7.2.210.0060.00914.91
7.2.200.0110.00314.98
7.2.190.0070.00715.27
7.2.180.0060.00914.95
7.2.170.0060.00615.17
7.2.160.0040.01415.07
7.2.150.0000.01317.04
7.2.140.0030.01216.71
7.2.130.0000.01316.95
7.2.120.0090.00616.79
7.2.110.0040.01117.17
7.2.100.1120.00315.97
7.2.90.1040.00715.83
7.2.80.1000.00516.11
7.2.70.1910.00516.05
7.2.60.1370.00316.18
7.2.50.1800.01116.04
7.2.40.1240.00816.08
7.2.30.1090.00715.95
7.2.20.1400.01016.12
7.2.10.1440.00515.97
7.2.00.1180.00616.04
7.1.330.0040.00716.00
7.1.320.0070.01015.88
7.1.310.0100.00715.95
7.1.300.0080.00315.95
7.1.290.0030.00615.91
7.1.280.0030.01315.73
7.1.270.0030.00916.04
7.1.260.0070.00716.11
7.1.250.0090.00915.96
7.1.240.0080.00615.77
7.1.230.0100.00315.91
7.1.220.0970.00714.96
7.1.210.0980.00914.86
7.1.200.1050.00714.91
7.1.190.1180.01014.82
7.1.180.1370.00215.00
7.1.170.1250.00714.96
7.1.160.1270.00514.99
7.1.150.1190.00814.85
7.1.140.1390.00714.96
7.1.130.1200.00814.94
7.1.120.1130.01214.97
7.1.110.1310.00814.90
7.1.100.1310.00515.04
7.1.90.1400.00514.88
7.1.80.1710.00514.93
7.1.70.1600.00714.94
7.1.60.1500.01324.00
7.1.50.2520.01023.86
7.1.40.2410.00823.90
7.1.30.2500.00223.97
7.1.20.2400.01023.96
7.1.10.2490.00815.02
7.1.00.1670.00514.86
7.0.330.0030.01415.65
7.0.320.0000.01415.49
7.0.310.0040.00715.19
7.0.300.0130.00015.63
7.0.290.0090.00315.61
7.0.280.0000.01115.41
7.0.270.0070.00715.58
7.0.260.0000.01515.45
7.0.250.0120.00615.64
7.0.240.0030.00715.22
7.0.230.0120.00015.66
7.0.220.0040.01115.57
7.0.210.0120.00315.36
7.0.200.0030.01015.36
7.0.190.0070.00715.56
7.0.180.0060.00315.73
7.0.170.0000.01215.64
7.0.160.0100.00315.45
7.0.150.0130.00015.45
7.0.140.0040.00715.49
7.0.130.0050.00315.67
7.0.120.0100.00315.62
7.0.110.0080.00015.30
7.0.100.0090.00315.30
7.0.90.0030.01015.69
7.0.80.0000.01515.51
7.0.70.0040.01115.54
7.0.60.0040.00715.48
7.0.50.0040.00815.57
7.0.40.0100.00313.36
7.0.30.0070.00713.79
7.0.20.0060.00613.76
7.0.10.0030.01013.62
7.0.00.0030.01013.62
5.6.400.0090.00614.34
5.6.390.0040.01113.95
5.6.380.0060.00514.02
5.6.370.0000.01414.27
5.6.360.0070.01014.50
5.6.350.0000.01514.47
5.6.340.0070.00714.47
5.6.330.0100.00314.11
5.6.320.0120.00614.17
5.6.310.0130.00314.32
5.6.300.0030.00614.53
5.6.290.0030.00714.23
5.6.280.0140.00014.23
5.6.270.0030.00914.25
5.6.260.0070.00713.99
5.6.250.0080.00314.41
5.6.240.0040.01114.21
5.6.230.0000.01014.37
5.6.220.0030.00614.25
5.6.210.0070.00414.35
5.6.200.0030.00614.40
5.6.190.0030.01514.23
5.6.180.0030.01014.08
5.6.170.0060.01214.53
5.6.160.0060.00614.18
5.6.150.0030.00714.21
5.6.140.0070.00714.22
5.6.130.0070.00714.09
5.6.120.0080.00414.38
5.6.110.0040.01114.20
5.6.100.0070.00714.16
5.6.90.0050.00514.42
5.6.80.0000.01314.13
5.6.70.0040.01214.41
5.6.60.0060.00614.26
5.6.50.0030.01014.14
5.6.40.0090.00614.27
5.6.30.0030.01314.28
5.6.20.0070.01114.27
5.6.10.0070.01114.30
5.6.00.0090.00014.29

preferences:
30.32 ms | 403 KiB | 5 Q