3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = 'Aenean lacinia bibendum <a href="/life">life</a> sed consectetur. <a href="/work">Work</a> quis risus eget urna mollis ornare <a href="/about">about</a> leo. <h1> attribute="whatever">asiponfpweg ihnasegio</h1>asd <p>whatever</p> <img src=""></img> <h3> attribute="whatever">asiponfpweg ihnasegio</h3> <p>whatever</p> <p>whatever</p> <h1><span> attribute="whatever">asiponfpweg ihnasegio</span></h3> <p>whatever</p> <h3> attribute="whatever">asiponfpweg ihnasegio</h3>'; echo preg_replace('/<h\d.+?(?=<h\d|$)/s', '<div>$0</div>', $html);

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.0090.00916.81
8.5.00.0110.01020.14
8.4.150.0020.00014.05
8.4.140.0130.00817.71
8.4.130.0060.00317.95
8.4.120.0080.00323.99
8.4.110.0120.00822.43
8.4.100.0140.00718.96
8.4.90.0110.01018.84
8.4.80.0020.00618.93
8.4.70.0130.00918.26
8.4.60.0060.00318.61
8.4.50.0050.00418.82
8.4.40.0120.00817.80
8.4.30.0130.00718.64
8.4.20.0110.01120.54
8.4.10.0190.00020.35
8.3.280.0110.00918.40
8.3.270.0110.00816.42
8.3.260.0100.01016.86
8.3.250.0080.01118.97
8.3.240.0130.00617.14
8.3.230.0050.00516.77
8.3.220.0050.00218.97
8.3.210.0100.01016.74
8.3.200.0030.00616.55
8.3.190.0110.01117.14
8.3.180.0120.00617.03
8.3.170.0130.00718.85
8.3.160.0070.01117.30
8.3.150.0140.00717.29
8.3.140.0060.00316.55
8.3.130.0030.00618.40
8.3.120.0070.00318.95
8.3.110.0110.00020.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0070.00419.36
8.3.70.0100.01016.58
8.3.60.0090.00616.63
8.3.50.0150.00323.66
8.3.40.0070.01018.91
8.3.30.0120.00319.39
8.3.20.0030.00624.18
8.3.10.0050.00324.66
8.3.00.0000.00726.16
8.2.290.0100.00820.68
8.2.280.0090.00618.49
8.2.270.0070.01117.05
8.2.260.0070.00716.75
8.2.250.0030.00618.70
8.2.240.0000.00917.06
8.2.230.0030.00622.58
8.2.220.0000.00837.54
8.2.210.0000.00726.77
8.2.200.0110.00018.88
8.2.190.0110.00416.75
8.2.180.0100.01025.92
8.2.170.0060.00922.96
8.2.160.0130.00722.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0000.00826.35
8.2.110.0000.00922.23
8.2.100.0080.00319.70
8.2.90.0000.00817.97
8.2.80.0040.00419.08
8.2.70.0030.00617.75
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00418.09
8.2.20.0050.00218.20
8.2.10.0000.00719.09
8.2.00.0040.00419.25
8.1.330.0090.00722.00
8.1.320.0140.00616.27
8.1.310.0070.01016.68
8.1.300.0100.00020.11
8.1.290.0050.00530.84
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00323.96
8.1.230.0080.00319.10
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0060.00317.35
8.1.180.0030.00518.10
8.1.170.0040.00418.63
8.1.160.0080.00018.84
8.1.150.0070.00018.86
8.1.140.0070.00018.87
8.1.130.0070.00020.01
8.1.120.0070.00017.56
8.1.110.0060.00317.54
8.1.100.0000.00817.42
8.1.90.0030.00317.55
8.1.80.0040.00717.56
8.1.70.0080.00017.56
8.1.60.0000.00817.60
8.1.50.0030.00617.58
8.1.40.0000.00817.65
8.1.30.0080.00317.73
8.1.20.0040.00717.66
8.1.10.0050.00317.69
8.1.00.0090.00317.56
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.40
8.0.270.0040.00418.22
8.0.260.0040.00418.34
8.0.250.0030.00317.11
8.0.240.0030.00316.96
8.0.230.0080.00017.02
8.0.220.0070.00017.04
8.0.210.0050.00216.84
8.0.200.0030.00316.95
8.0.190.0030.00416.99
8.0.180.0040.00417.08
8.0.170.0030.00617.03
8.0.160.0070.00016.96
8.0.150.0040.00716.92
8.0.140.0030.00516.98
8.0.130.0000.00913.42
8.0.120.0000.00716.90
8.0.110.0040.00316.87
8.0.100.0000.00716.93
8.0.90.0040.00417.03
8.0.80.0120.00616.95
8.0.70.0000.00716.94
8.0.60.0040.00416.79
8.0.50.0030.00516.86
8.0.30.0070.01117.50
8.0.20.0100.01017.24
8.0.10.0000.00717.04
8.0.00.0150.00916.90
7.4.330.0000.00515.55
7.4.320.0030.00316.67
7.4.300.0030.00316.62
7.4.290.0040.00416.70
7.4.280.0050.00316.54
7.4.270.0090.00016.67
7.4.260.0000.00713.54
7.4.250.0050.00316.61
7.4.240.0040.00416.72
7.4.230.0030.00316.73
7.4.220.0040.00416.63
7.4.210.0080.01016.75
7.4.200.0030.00316.68
7.4.130.0090.01216.70
7.4.120.0120.01216.64
7.4.110.0130.00416.69
7.4.100.0120.00416.51
7.4.90.0110.00516.71
7.4.80.0080.00819.39
7.4.70.0180.00216.63
7.4.60.0070.01116.67
7.4.50.0110.00916.59
7.4.40.0100.00716.55
7.4.30.0060.01016.73
7.4.20.0100.00716.77
7.4.10.0060.01016.50
7.4.00.0030.01316.36
7.3.330.0000.00716.30
7.3.320.0060.00013.27
7.3.310.0040.00416.26
7.3.300.0040.00416.15
7.3.290.0090.00616.31
7.3.260.0120.00616.50
7.3.240.0100.00816.52
7.3.230.0130.00316.64
7.3.210.0060.01016.46
7.3.200.0080.00816.34
7.3.190.0090.00916.72
7.3.180.0130.00316.21
7.3.170.0030.01416.70
7.3.160.0060.01216.32
7.3.150.0130.00316.34
7.3.140.0030.01216.34
7.3.130.0130.00316.65
7.3.120.0090.00616.55
7.3.110.0080.00716.55
7.3.100.0030.01616.53
7.3.90.0080.00816.59
7.3.80.0120.00316.27
7.3.70.0150.00616.35
7.3.60.0090.00616.30
7.3.50.0170.00316.44
7.3.40.0060.00916.39
7.3.30.0090.00916.42
7.3.20.0040.01516.33
7.3.10.0060.01216.39
7.3.00.0100.00716.54
7.2.330.0130.00416.50
7.2.320.0100.00716.66
7.2.310.0100.00716.71
7.2.300.0160.00016.65
7.2.290.0100.00616.39
7.2.280.0030.01416.48
7.2.270.0070.01016.56
7.2.260.0100.00716.62
7.2.250.0100.00716.74
7.2.240.0120.00616.55
7.2.230.0110.00716.48
7.2.220.0100.00616.48
7.2.210.0100.00716.67
7.2.200.0130.01016.59
7.2.190.0170.00716.57
7.2.180.0060.01216.57
7.2.170.0060.00916.50
7.2.160.0060.01116.57
7.2.150.0230.00916.60
7.2.140.0130.00316.74
7.2.130.0100.01016.71
7.2.120.0030.01416.63
7.2.110.0070.01116.56
7.2.100.0120.00616.54
7.2.90.0030.01516.64
7.2.80.0030.01516.60
7.2.70.0100.01016.51
7.2.60.0120.00916.71
7.2.50.0090.01516.71
7.2.40.0070.01416.55
7.2.30.0060.01216.79
7.2.20.0090.01116.46
7.2.10.0030.01616.59
7.2.00.0120.00616.61

preferences:
36.39 ms | 403 KiB | 5 Q