3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="I am a string with several periods.period #1. period #2."; preg_match_all("/\.\s*\w/", $str, $matches); foreach($matches[0] as $match){ $str = str_replace($match, strtoupper($match), $str); } echo $str;

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.70.0120.00316.88
8.3.60.0260.00822.11
8.3.50.0070.01222.15
8.3.40.0180.01122.42
8.3.30.0180.01122.45
8.3.20.0220.00322.38
8.3.10.0210.00823.93
8.3.00.0200.00623.47
8.2.190.0090.00616.90
8.2.180.0250.01022.16
8.2.170.0250.00424.44
8.2.160.0260.00523.23
8.2.150.0240.00525.05
8.2.140.0190.00525.29
8.2.130.0180.00726.04
8.2.120.0190.01223.43
8.2.110.0200.00623.22
8.2.100.0150.01221.91
8.2.90.0150.00722.13
8.2.80.0180.00321.95
8.2.70.0170.00421.99
8.2.60.0160.00422.04
8.2.50.0170.00522.01
8.2.40.0200.01124.10
8.2.30.0240.00622.62
8.2.20.0160.01021.99
8.2.10.0200.00721.97
8.2.00.0130.01022.07
8.1.280.0190.01025.92
8.1.270.0170.01224.08
8.1.260.0260.00326.14
8.1.250.0220.00727.00
8.1.240.0200.00624.87
8.1.230.0160.01024.89
8.1.220.0200.00521.83
8.1.210.0180.00622.35
8.1.200.0150.00721.64
8.1.190.0200.00421.64
8.1.180.0230.00622.01
8.1.170.0240.00622.31
8.1.160.0170.00722.42
8.1.150.0170.00522.42
8.1.140.0210.00224.05
8.1.130.0160.00523.02
8.1.120.0170.00221.74
8.1.110.0150.00321.76
8.1.100.0190.00421.78
8.1.90.0170.00821.77
8.1.80.0230.00221.77
8.1.70.0180.00421.73
8.1.60.0210.00921.77
8.1.50.0320.00621.72
8.1.40.0200.01021.81
8.1.30.0210.00621.81
8.1.20.0110.01521.79
8.1.10.0240.00121.83
8.1.00.0180.00521.78
8.0.300.0120.00722.89
8.0.290.0160.00321.40
8.0.280.0190.00022.19
8.0.270.0150.00421.61
8.0.260.0110.00722.14
8.0.250.0110.00921.53
8.0.240.0140.00521.51
8.0.230.0150.00621.51
8.0.220.0260.00721.43
8.0.210.0180.00821.51
8.0.200.0120.01221.47
8.0.190.0160.00621.50
8.0.180.0230.00221.50
8.0.170.0190.00521.43
8.0.160.0160.00721.52
8.0.150.0150.00621.48
8.0.140.0140.00721.42
8.0.130.0140.00619.71
8.0.120.0150.00521.45
8.0.110.0160.00521.43
8.0.100.0160.00321.43
8.0.90.0200.00321.51
8.0.80.0170.00620.00
8.0.70.0140.00621.39
8.0.60.0140.00421.51
8.0.50.0170.00121.51
8.0.30.0130.01020.17
8.0.20.0130.00819.44
8.0.10.0140.01021.56
8.0.00.0160.00519.25
7.4.330.0210.00320.73
7.4.320.0130.00821.31
7.4.300.0120.00621.34
7.4.290.0120.01021.30
7.4.280.0220.00221.30
7.4.270.0180.00521.33
7.4.260.0210.00521.30
7.4.250.0190.00621.28
7.4.240.0150.00521.39
7.4.230.0160.00521.27
7.4.220.0170.00421.32
7.4.210.0120.00919.10
7.4.200.0130.00721.36
7.4.190.0200.01325.92
7.4.180.0320.00925.92
7.4.160.0110.00918.18
7.4.150.0210.00721.34
7.4.140.0110.01018.84
7.4.130.0140.00919.76
7.4.120.0140.01018.18
7.4.110.0220.01119.73
7.4.100.0170.00819.81
7.4.90.0170.00819.74
7.4.80.0230.00520.65
7.4.70.0130.00818.53
7.4.60.0140.00718.57
7.4.50.0110.00918.54
7.4.40.0100.01118.40
7.4.30.0130.00819.03
7.4.20.0110.01018.90
7.4.10.0130.00718.48
7.4.00.0100.00917.97
7.3.330.0150.00219.60
7.3.320.0130.00419.62
7.3.310.0140.00521.22
7.3.300.0140.00521.19
7.3.290.0140.00621.17
7.3.280.0170.00821.15
7.3.270.0160.01221.16
7.3.260.0130.00818.08
7.3.250.0190.00521.21
7.3.240.0130.00818.09
7.3.230.0170.00619.59
7.3.220.0170.00821.22
7.3.210.0110.00919.69
7.3.200.0160.00719.65
7.3.190.0150.00718.50
7.3.180.0110.00918.45
7.3.170.0120.00918.47
7.3.160.0110.01018.45
7.3.150.0150.00518.85
7.3.140.0110.00918.89
7.3.130.0110.00818.42
7.3.120.0110.00817.80
7.3.110.0080.00917.44
7.3.100.0100.01017.54
7.3.90.0120.00817.49
7.3.80.0130.00617.43
7.3.70.0130.00717.40
7.3.60.0110.00817.46
7.3.50.0120.00617.42
7.3.40.0120.00717.40
7.3.30.0130.00717.46
7.3.20.0100.00817.93
7.3.10.0160.00817.94
7.3.00.0250.00717.69
7.2.340.0230.00521.27
7.2.330.0160.01019.87
7.2.320.0230.00519.83
7.2.310.0120.01018.66
7.2.300.0190.00918.60
7.2.290.0130.01018.56
7.2.280.0170.00819.09
7.2.270.0180.00719.03
7.2.260.0120.01118.66
7.2.250.0110.01218.59
7.2.240.0140.00717.62
7.2.230.0110.01117.61
7.2.220.0130.01117.57
7.2.210.0120.01017.71
7.2.200.0160.00617.63
7.2.190.0090.01217.61
7.2.180.0120.00917.63
7.2.170.0120.00917.59
7.2.160.0160.00617.63
7.2.150.0130.01118.16
7.2.140.0140.00718.16
7.2.130.0140.01018.00
7.2.120.0230.00917.84
7.2.110.0170.01017.75
7.2.100.0360.00917.77
7.2.90.0230.00917.80
7.2.80.0210.00917.81
7.2.70.0240.01017.80
7.2.60.0240.00917.78
7.2.50.0320.00817.86
7.2.40.0200.00817.79
7.2.30.0240.01117.78
7.2.20.0220.01017.80
7.2.10.0280.00717.79
7.2.00.0230.00917.78
7.1.330.0150.00917.30
7.1.320.0170.00717.24
7.1.310.0200.00717.30
7.1.300.0220.00917.23
7.1.290.0180.00817.17
7.1.280.0170.00917.19
7.1.270.0220.01017.29
7.1.260.0140.01217.18
7.1.250.0170.00817.23
7.1.240.0320.00716.88
7.1.230.0270.01016.88
7.1.220.0360.00816.91
7.1.210.0220.01116.91
7.1.200.0230.01016.86
7.1.190.0240.00916.88
7.1.180.0380.00916.90
7.1.170.0320.00816.93
7.1.160.0420.00916.90
7.1.150.0340.00716.94
7.1.140.0280.00816.96
7.1.130.0340.00816.88
7.1.120.0330.01016.93
7.1.110.0330.01016.99
7.1.100.0300.01216.91
7.1.90.0390.01116.90
7.1.80.0320.00816.92
7.1.70.0460.00916.95
7.1.60.0350.01016.98
7.1.50.0280.00817.00
7.1.40.0290.00816.92
7.1.30.0340.00717.01
7.1.20.0260.00916.98
7.1.10.0280.01116.90
7.1.00.0320.00916.89
7.0.330.0190.00917.23
7.0.320.0290.01016.57
7.0.310.0220.01017.04
7.0.300.0210.00817.05
7.0.290.0200.00917.10
7.0.280.0200.00617.06
7.0.270.0190.00917.10
7.0.260.0170.01017.11
7.0.250.0200.00917.16
7.0.240.0210.00617.14
7.0.230.0190.00817.15
7.0.220.0190.00917.14
7.0.210.0190.00917.16
7.0.200.0190.00917.18
7.0.190.0200.00717.20
7.0.180.0200.00817.19
7.0.170.0210.00617.16
7.0.160.0210.00917.16
7.0.150.0270.01117.11
7.0.140.0390.00817.09
7.0.130.0170.01017.17
7.0.120.0200.01017.16
7.0.110.0240.00817.16
7.0.100.0200.00717.19
7.0.90.0190.00817.08
7.0.80.0200.00617.11
7.0.70.0200.00817.11
7.0.60.0180.01017.17
7.0.50.0170.00817.12
7.0.40.0180.00917.20
7.0.30.0280.00817.20
7.0.20.0180.00917.12
7.0.10.0180.00817.17
7.0.00.0230.00717.13
5.6.400.0210.00917.36
5.6.390.0200.01017.34
5.6.380.0180.01016.86
5.6.370.0220.00717.33
5.6.360.0190.01117.26
5.6.350.0190.00917.37
5.6.340.0200.00917.34
5.6.330.0210.00917.25
5.6.320.0210.00817.34
5.6.310.0170.01317.27
5.6.300.0170.01217.28
5.6.290.0200.00917.26
5.6.280.0170.00817.30
5.6.270.0180.00817.30
5.6.260.0180.00717.35
5.6.250.0150.01117.30
5.6.240.0170.01117.32
5.6.230.0160.01117.38
5.6.220.0170.01317.33
5.6.210.0160.01117.33
5.6.200.0190.00817.29
5.6.190.0190.01017.33
5.6.180.0220.00617.41
5.6.170.0200.01017.34
5.6.160.0190.00817.42
5.6.150.0170.01017.36
5.6.140.0160.00917.41
5.6.130.0170.00917.40
5.6.120.0200.00817.40
5.6.110.0190.01217.42
5.6.100.0200.00917.29
5.6.90.0170.01217.36
5.6.80.0170.01217.23
5.6.70.0180.01017.31
5.6.60.0150.01217.28
5.6.50.0180.00817.34
5.6.40.0170.00817.35
5.6.30.0160.00917.25
5.6.20.0200.00917.18
5.6.10.0180.00817.25
5.6.00.0180.01017.23

preferences:
47.06 ms | 401 KiB | 5 Q