3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = '<p>Today, not only we have so many breeds that are trained this and that.</p> <h4><strong>We must add a dot after the closing strong</strong></h4> <p>Hunting with your dog is a blah blah with each other.</p> <h2>No need to change this one!</h2> <p>Hunting with your dog is a blah blah with each other.</p>'; $source = addMissingPunctuation( $source ); echo $source; function addMissingPunctuation( $input ) { return preg_replace("/[^,.;!?]\K<\/h[1-6]>/mi", '.\0', $input); }

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.10.0110.00616.76
8.5.00.0130.00920.15
8.4.150.0020.00114.05
8.4.140.0120.01017.70
8.4.130.0130.00818.25
8.4.120.0160.00420.40
8.4.110.0120.00919.12
8.4.100.0160.00518.08
8.4.90.0120.00920.25
8.4.80.0110.00920.66
8.4.70.0090.00718.09
8.4.60.0150.00620.56
8.4.50.0130.00619.66
8.4.40.0040.00817.74
8.4.30.0160.00317.72
8.4.20.0130.00719.54
8.4.10.0090.00017.86
8.3.280.0110.00918.47
8.3.270.0130.00716.57
8.3.260.0100.01016.70
8.3.250.0080.01018.93
8.3.240.0080.01116.63
8.3.230.0130.00517.09
8.3.220.0120.00818.75
8.3.210.0080.01016.66
8.3.200.0050.00316.84
8.3.190.0040.00517.11
8.3.180.0050.00520.92
8.3.170.0070.01118.63
8.3.160.0070.01118.34
8.3.150.0090.00920.49
8.3.140.0040.01416.73
8.3.130.0060.00918.44
8.3.120.0040.01118.98
8.3.110.0070.00320.94
8.3.100.0070.00724.06
8.3.90.0070.01126.77
8.3.80.0090.00016.75
8.3.70.0120.00616.58
8.3.60.0090.01318.43
8.3.50.0110.00917.54
8.3.40.0140.00018.77
8.3.30.0070.01018.88
8.3.20.0040.00420.21
8.3.10.0080.00023.68
8.3.00.0080.00021.90
8.2.290.0110.00317.26
8.2.280.0120.00920.77
8.2.270.0110.00717.15
8.2.260.0100.00719.01
8.2.250.0030.00718.66
8.2.240.0140.00417.43
8.2.230.0040.00422.58
8.2.220.0050.00537.54
8.2.210.0140.00326.77
8.2.200.0060.00316.75
8.2.190.0070.00716.58
8.2.180.0030.01418.67
8.2.170.0120.00319.21
8.2.160.0000.01322.96
8.2.150.0030.00525.66
8.2.140.0050.00324.66
8.2.130.0040.00420.52
8.2.120.0080.00026.35
8.2.110.0050.00520.43
8.2.100.0080.00417.84
8.2.90.0030.00518.09
8.2.80.0040.00419.16
8.2.70.0000.00917.75
8.2.60.0030.00517.63
8.2.50.0000.00917.75
8.2.40.0050.00317.88
8.2.30.0000.00719.38
8.2.20.0030.00618.00
8.2.10.0000.00718.02
8.2.00.0000.00718.13
8.1.330.0130.00716.47
8.1.320.0090.01016.43
8.1.310.0150.00420.16
8.1.300.0120.00618.16
8.1.290.0110.00418.88
8.1.280.0070.00725.92
8.1.270.0070.00022.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00723.82
8.1.230.0060.00622.72
8.1.220.0030.00517.74
8.1.210.0040.00418.82
8.1.200.0030.00617.35
8.1.190.0090.00017.23
8.1.180.0060.00319.01
8.1.170.0040.00418.59
8.1.160.0070.00318.85
8.1.150.0000.00719.97
8.1.140.0050.00319.02
8.1.130.0030.00318.94
8.1.120.0070.00017.56
8.1.110.0030.00717.58
8.1.100.0040.00417.44
8.1.90.0040.00417.52
8.1.80.0040.00417.44
8.1.70.0070.00017.57
8.1.60.0050.00317.64
8.1.50.0050.00317.58
8.1.40.0030.00517.59
8.1.30.0000.00817.79
8.1.20.0060.00317.81
8.1.10.0000.00917.70
8.1.00.0050.00217.49
8.0.300.0050.00220.07
8.0.290.0060.00316.75
8.0.280.0030.00318.52
8.0.270.0030.00417.19
8.0.260.0000.00618.93
8.0.250.0030.00517.11
8.0.240.0040.00417.14
8.0.230.0000.00716.94
8.0.220.0070.00016.89
8.0.210.0070.00016.89
8.0.200.0040.00417.04
8.0.190.0040.00417.03
8.0.180.0060.00316.93
8.0.170.0000.00717.02
8.0.160.0000.00716.87
8.0.150.0000.00916.98
8.0.140.0060.00316.96
8.0.130.0030.00313.36
8.0.120.0050.00516.99
8.0.110.0000.00816.90
8.0.100.0040.00416.84
8.0.90.0040.00416.93
8.0.80.0140.00016.98
8.0.70.0000.00716.82
8.0.60.0040.00416.84
8.0.50.0040.00416.80
8.0.30.0080.01117.20
8.0.20.0120.00817.40
8.0.10.0000.00816.96
8.0.00.0060.01316.59
7.4.330.0000.00415.55
7.4.320.0000.00616.75
7.4.300.0000.00716.71
7.4.290.0040.00416.61
7.4.280.0040.00416.64
7.4.270.0030.00316.81
7.4.260.0040.00416.76
7.4.250.0030.00316.82
7.4.240.0050.00316.73
7.4.230.0000.00816.90
7.4.220.0030.00316.68
7.4.210.0090.01116.91
7.4.200.0000.00716.82
7.4.160.0190.00716.72
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0110.00716.77
7.4.120.0120.00816.69
7.4.110.0090.00916.39
7.4.100.0070.01016.53
7.4.90.0090.00916.68
7.4.80.0130.01019.39
7.4.70.0070.01016.61
7.4.60.0130.00316.63
7.4.50.0030.01016.66
7.4.40.0100.00916.66
7.4.30.0070.01016.59
7.4.00.0060.00615.14
7.3.330.0050.00013.23
7.3.320.0050.00013.39
7.3.310.0000.00716.48
7.3.300.0030.00316.43
7.3.290.0070.00716.38
7.3.280.0100.00916.39
7.3.270.0100.01317.40
7.3.260.0080.01116.63
7.3.250.0080.00916.48
7.3.240.0130.00816.69
7.3.230.0130.00316.70
7.3.210.0030.01516.89
7.3.200.0090.01216.40
7.3.190.0080.00816.58
7.3.180.0130.01016.45
7.3.170.0090.00916.61
7.3.160.0110.00516.52
7.2.330.0110.01116.62
7.2.320.0070.01017.01
7.2.310.0100.01016.84
7.2.300.0090.01516.87
7.2.290.0070.01016.87
7.2.60.0150.00016.78
7.1.200.0060.00616.02
7.1.110.0030.01118.15
7.1.100.0000.01418.31
7.1.90.0900.00716.73
7.1.80.0070.00718.42
7.1.70.0080.00617.22
7.1.60.0990.01033.25
7.1.50.0860.01334.97
7.1.40.0980.02032.66
7.1.30.0880.01033.00
7.1.20.1020.01334.87
7.1.10.0060.00616.80
7.1.00.0830.01117.14
7.0.250.0060.00617.71
7.0.240.0040.01118.16
7.0.230.0040.01118.30
7.0.220.0020.01018.09
7.0.210.0030.01016.74
7.0.200.0740.00615.25
7.0.190.0750.00615.21
7.0.180.0770.01314.82
7.0.170.0740.00614.62
7.0.160.0860.01016.46
7.0.150.1020.00314.51
7.0.140.0820.01314.70
7.0.130.0050.00816.88
7.0.120.0000.01216.61
7.0.110.0070.00716.51
7.0.100.0000.01316.52
7.0.90.0140.00016.47
7.0.80.0060.00616.66
7.0.70.0070.00716.49
7.0.60.0030.01016.47
7.0.50.0000.01316.44
7.0.40.0080.00616.82
7.0.30.0000.01316.68
7.0.20.0080.00816.66
7.0.10.0060.00916.34
7.0.00.0040.01016.63

preferences:
18.81 ms | 403 KiB | 5 Q