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.0130.00516.67
8.5.00.0120.00919.89
8.4.150.0030.00014.05
8.4.140.0130.00817.79
8.4.130.0120.00818.99
8.4.120.0120.00823.76
8.4.110.0130.00718.99
8.4.100.0100.01018.88
8.4.90.0030.00620.73
8.4.80.0100.01018.80
8.4.70.0060.00218.39
8.4.60.0140.00719.06
8.4.50.0090.00318.00
8.4.40.0100.00317.82
8.4.30.0100.01017.89
8.4.20.0100.01019.79
8.4.10.0030.00617.90
8.3.280.0150.00618.54
8.3.270.0140.00716.55
8.3.260.0080.01016.38
8.3.250.0120.00918.89
8.3.240.0080.00916.92
8.3.230.0120.00816.69
8.3.220.0060.00118.77
8.3.210.0120.00416.91
8.3.200.0040.00416.79
8.3.190.0130.00516.98
8.3.180.0090.01016.85
8.3.170.0070.00717.33
8.3.160.0040.01416.62
8.3.150.0140.00418.81
8.3.140.0080.00016.75
8.3.130.0000.00818.44
8.3.120.0080.00818.85
8.3.110.0110.00420.94
8.3.100.0090.00618.62
8.3.90.0040.00426.77
8.3.80.0060.00318.43
8.3.70.0070.00718.30
8.3.60.0180.00416.63
8.3.50.0150.00317.49
8.3.40.0150.00018.88
8.3.30.0110.00719.02
8.3.20.0000.00720.39
8.3.10.0050.00323.67
8.3.00.0050.00321.73
8.2.290.0130.00520.35
8.2.280.0130.00618.44
8.2.270.0040.01516.54
8.2.260.0070.01019.02
8.2.250.0030.00616.52
8.2.240.0060.00316.94
8.2.230.0000.00922.58
8.2.220.0080.00024.06
8.2.210.0140.00726.77
8.2.200.0080.00018.88
8.2.190.0160.00316.58
8.2.180.0130.01318.66
8.2.170.0100.00722.96
8.2.160.0100.00319.30
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00720.58
8.2.120.0000.00726.35
8.2.110.0000.01122.25
8.2.100.0040.00818.03
8.2.90.0000.00818.03
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0080.00018.22
8.2.50.0050.00218.10
8.2.40.0040.00420.47
8.2.30.0000.00819.38
8.2.20.0040.00418.15
8.2.10.0040.00418.21
8.2.00.0040.00418.23
8.1.330.0070.00422.26
8.1.320.0100.00817.91
8.1.310.0060.00316.82
8.1.300.0040.01118.62
8.1.290.0090.00030.84
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00022.20
8.1.230.0090.00321.03
8.1.220.0040.00417.78
8.1.210.0040.00419.03
8.1.200.0050.00317.35
8.1.190.0060.00317.36
8.1.180.0080.00018.10
8.1.170.0040.00418.71
8.1.160.0030.00518.72
8.1.150.0040.00420.11
8.1.140.0000.00719.01
8.1.130.0040.00417.66
8.1.120.0040.00417.48
8.1.110.0040.00817.44
8.1.100.0030.00517.52
8.1.90.0040.00417.58
8.1.80.0050.00317.43
8.1.70.0000.00717.52
8.1.60.0050.00317.75
8.1.50.0030.00517.55
8.1.40.0000.00817.60
8.1.30.0000.00817.82
8.1.20.0000.00817.70
8.1.10.0000.00817.73
8.1.00.0040.00417.58
8.0.300.0000.00919.96
8.0.290.0040.00416.88
8.0.280.0030.00318.40
8.0.270.0000.00717.29
8.0.260.0000.00716.93
8.0.250.0050.00217.11
8.0.240.0040.00417.15
8.0.230.0030.00316.91
8.0.220.0040.00416.96
8.0.210.0000.00716.88
8.0.200.0030.00317.07
8.0.190.0040.00417.02
8.0.180.0040.00416.88
8.0.170.0030.00517.03
8.0.160.0070.00017.07
8.0.150.0000.00716.87
8.0.140.0030.00616.99
8.0.130.0000.00613.34
8.0.120.0050.00316.95
8.0.110.0040.00416.86
8.0.100.0050.00317.06
8.0.90.0050.00316.86
8.0.80.0080.00817.02
8.0.70.0000.00716.84
8.0.60.0070.00017.00
8.0.50.0070.00016.95
8.0.30.0130.00817.27
8.0.20.0120.01117.44
8.0.10.0000.00716.89
8.0.00.0070.01016.99
7.4.330.0000.00615.55
7.4.320.0030.00316.80
7.4.300.0030.00316.83
7.4.290.0070.00016.60
7.4.280.0070.00016.72
7.4.270.0000.00816.73
7.4.260.0040.00416.81
7.4.250.0040.00416.68
7.4.240.0000.00716.73
7.4.230.0080.00016.84
7.4.220.0150.00616.76
7.4.210.0030.01316.73
7.4.200.0030.00316.88
7.4.160.0150.00616.71
7.4.150.0140.00417.40
7.4.140.0110.01117.86
7.4.130.0110.00716.71
7.4.120.0120.00816.70
7.4.110.0100.00716.64
7.4.100.0130.00316.45
7.4.90.0070.01016.51
7.4.80.0100.00719.39
7.4.70.0060.01116.71
7.4.60.0100.00716.78
7.4.50.0060.00916.64
7.4.40.0100.01016.73
7.4.30.0080.00916.80
7.4.00.0030.01315.23
7.3.330.0060.00013.32
7.3.320.0030.00313.47
7.3.310.0040.00416.50
7.3.300.0030.00316.32
7.3.290.0030.01316.48
7.3.280.0110.00816.49
7.3.270.0060.01117.40
7.3.260.0160.00616.60
7.3.250.0080.01116.51
7.3.240.0100.00716.59
7.3.230.0060.01116.53
7.3.210.0070.01116.76
7.3.200.0090.01216.69
7.3.190.0130.00316.82
7.3.180.0090.01216.47
7.3.170.0030.01316.55
7.3.160.0060.01016.71
7.3.10.0040.00916.84
7.3.00.0000.00916.72
7.2.330.0130.00816.59
7.2.320.0060.01016.79
7.2.310.0140.00916.90
7.2.300.0080.01616.75
7.2.290.0030.01216.86
7.2.130.0080.00617.02
7.2.120.0060.00617.16
7.2.110.0070.00317.12
7.2.100.0070.00717.18
7.2.90.0030.01416.99
7.2.80.0040.00717.06
7.2.70.0090.00917.06
7.2.60.0120.00516.93
7.2.50.0060.00616.90
7.2.40.0050.00517.31
7.2.30.0030.01217.13
7.2.20.0090.00617.24
7.2.10.0080.00417.02
7.2.00.0060.00917.11
7.1.250.0000.01316.04
7.1.200.0060.00916.11
7.1.110.0060.00918.59
7.1.100.0040.00818.47
7.1.90.0070.00717.77
7.1.80.0150.00618.09
7.1.70.0040.01117.13
7.1.60.0220.01135.25
7.1.50.0220.01635.00
7.1.40.0190.00634.70
7.1.30.0110.01434.68
7.1.20.0250.01334.72
7.1.10.0030.01516.71
7.1.00.0030.00916.84
7.0.250.0030.01017.89
7.0.240.0030.00918.07
7.0.230.0060.01317.68
7.0.220.0080.01317.88
7.0.210.0070.00716.82
7.0.200.0070.01016.93
7.0.190.0000.01416.77
7.0.180.0000.01316.49
7.0.170.0110.00716.54
7.0.160.0000.01816.18
7.0.150.0000.01416.46
7.0.140.0030.00916.68
7.0.130.0000.01116.66
7.0.120.0030.00916.63
7.0.110.0070.00416.77
7.0.100.0080.00416.60
7.0.90.0080.00616.74
7.0.80.0040.00816.64
7.0.70.0030.00916.69
7.0.60.0060.00616.44
7.0.50.0060.00616.45
7.0.40.0000.01416.59
7.0.30.0040.01116.67
7.0.20.0000.01716.55
7.0.10.0030.01416.56
7.0.00.0030.01416.63

preferences:
180.75 ms | 403 KiB | 5 Q