3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "<div class='room'> <h1>This is a h1</h1> <p>This is a Paragraph</p> <h2>This is h2</h2> </div>"; $arr = explode(PHP_EOL, $str); $res =array(); Foreach($arr as $row){ If(!strpos($row, "div") !== False){ $res[substr($row, 1, strpos($row, ">")-1)] = strip_tags($row); } } Var_dump($res);

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.0100.01020.69
8.4.110.0150.00522.38
8.4.100.0100.00917.57
8.4.90.0090.00318.55
8.4.80.0040.00518.10
8.4.70.0110.00518.21
8.4.60.0100.01018.64
8.4.50.0100.01118.50
8.4.40.0160.00319.50
8.4.30.0030.00519.58
8.4.20.0190.00017.49
8.4.10.0000.00919.45
8.3.250.0140.00518.88
8.3.240.0110.00916.85
8.3.230.0120.00716.55
8.3.220.0040.00317.10
8.3.210.0130.00616.42
8.3.200.0060.00316.56
8.3.190.0110.00917.19
8.3.180.0110.00918.52
8.3.170.0150.00320.41
8.3.160.0040.01416.92
8.3.150.0130.00417.29
8.3.140.0050.00316.66
8.3.130.0040.00418.52
8.3.120.0060.00320.72
8.3.110.0030.01320.94
8.3.100.0070.00416.47
8.3.90.0000.00826.77
8.3.80.0080.00316.38
8.3.70.0110.00716.63
8.3.60.0140.00316.50
8.3.50.0100.00516.63
8.3.40.0070.01118.97
8.3.30.0070.00719.02
8.3.20.0000.00821.95
8.3.10.0080.00021.75
8.3.00.0080.00020.96
8.2.290.0110.00820.72
8.2.280.0050.00420.06
8.2.270.0140.00317.14
8.2.260.0150.00316.54
8.2.250.0040.01416.69
8.2.240.0110.00717.36
8.2.230.0000.00922.58
8.2.220.0040.00424.06
8.2.210.0000.01826.77
8.2.200.0040.00416.50
8.2.190.0060.00916.58
8.2.180.0130.01025.92
8.2.170.0070.00718.86
8.2.160.0070.00722.96
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0000.00822.31
8.2.120.0040.00426.35
8.2.110.0080.00020.35
8.2.100.0040.00717.75
8.2.90.0000.00817.84
8.2.80.0060.00319.14
8.2.70.0050.00317.93
8.2.60.0000.00818.22
8.2.50.0110.00318.10
8.2.40.0040.00420.62
8.2.30.0050.00319.29
8.2.20.0000.00818.14
8.2.10.0090.00217.85
8.2.00.0060.00417.91
8.1.330.0110.00721.94
8.1.320.0110.00916.28
8.1.310.0080.00018.32
8.1.300.0030.00916.38
8.1.290.0100.00030.84
8.1.280.0070.01125.92
8.1.270.0080.00023.99
8.1.260.0090.00026.35
8.1.250.0060.00328.09
8.1.240.0040.00422.61
8.1.230.0090.00322.67
8.1.220.0060.00317.74
8.1.210.0040.00418.79
8.1.200.0030.00717.35
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0080.00018.66
8.1.160.0070.00018.90
8.1.150.0040.00422.07
8.1.140.0060.00418.54
8.1.130.0030.00718.13
8.1.120.0060.00417.50
8.1.110.0030.00717.43
8.1.100.0060.00617.42
8.1.90.0060.00717.41
8.1.80.0040.00617.50
8.1.70.0070.00417.44
8.1.60.0070.00617.57
8.1.50.0060.00717.50
8.1.40.0100.00317.52
8.1.30.0070.00617.62
8.1.20.0030.00917.56
8.1.10.0110.00117.48
8.1.00.0070.00517.42
8.0.300.0080.00021.96
8.0.290.0030.00616.58
8.0.280.0030.00318.37
8.0.270.0080.00316.72
8.0.260.0040.00517.66
8.0.250.0070.00316.84
8.0.240.0030.00716.78
8.0.230.0090.00316.85
8.0.220.0080.00516.82
8.0.210.0080.00416.80
8.0.200.0060.00516.95
8.0.190.0080.00516.84
8.0.180.0040.00816.86
8.0.170.0090.00416.83
8.0.160.0110.00116.76
8.0.150.0080.00416.78
8.0.140.0080.00416.74
8.0.130.0070.00515.68
8.0.120.0090.00416.79
8.0.110.0070.00516.78
8.0.100.0080.00516.79
8.0.90.0080.00516.81
8.0.80.0120.00716.81
8.0.70.0040.00816.74
8.0.60.0080.00516.83
8.0.50.0070.00616.86
8.0.30.0120.00516.93
8.0.20.0130.00617.22
8.0.10.0080.00416.89
8.0.00.0090.00616.82
7.4.330.0050.00415.92
7.4.320.0040.00816.49
7.4.300.0100.00316.49
7.4.290.0060.00716.52
7.4.280.0100.00416.46
7.4.270.0090.00416.53
7.4.260.0060.00415.42
7.4.250.0060.00616.48
7.4.240.0100.00316.52
7.4.230.0090.00416.44
7.4.220.0080.00816.48
7.4.210.0070.00816.54
7.4.200.0090.00316.56
7.4.190.0100.00416.50
7.4.180.0090.00516.47
7.4.160.0090.00716.60
7.4.150.0070.00816.76
7.4.140.0110.00717.28
7.4.130.0080.00716.38
7.4.120.0110.00816.47
7.4.110.0080.00716.36
7.4.100.0090.00616.51
7.4.90.0080.00616.49
7.4.80.0120.00517.35
7.4.70.0120.00216.45
7.4.60.0080.00516.45
7.4.50.0100.00216.20
7.4.40.0120.00216.43
7.4.30.0090.00816.46
7.4.20.0120.00216.34
7.4.10.0090.00416.30
7.4.00.0070.00515.97
7.3.330.0080.00415.29
7.3.320.0060.00515.25
7.3.310.0070.00516.34
7.3.300.0070.00616.34
7.3.290.0090.00716.32
7.3.280.0100.00716.31
7.3.270.0100.00616.64
7.3.260.0160.01016.37
7.3.250.0140.00316.42
7.3.240.0090.00716.30
7.3.230.0060.01116.29
7.3.220.0120.00316.19
7.3.210.0120.00216.23
7.3.200.0100.00516.38
7.3.190.0090.00916.32
7.3.180.0090.00716.35
7.3.170.0090.00616.33
7.3.160.0100.00616.39
7.3.150.0090.00716.31
7.3.140.0100.00516.24
7.3.130.0130.00216.19
7.3.120.0120.00216.20
7.3.110.0120.00216.23
7.3.100.0100.00616.18
7.3.90.0100.00416.52
7.3.80.0140.00016.30
7.3.70.0130.00216.32
7.3.60.0120.00416.27
7.3.50.0160.00016.43
7.3.40.0070.00716.43
7.3.30.0150.00016.29
7.3.20.0110.00417.28
7.3.10.0120.00417.33
7.3.00.0270.00117.22
7.2.340.0130.00216.34
7.2.330.0120.00516.44
7.2.320.0080.00716.43
7.2.310.0070.00816.48
7.2.300.0110.00516.39
7.2.290.0100.00616.47
7.2.280.0130.00316.30
7.2.270.0080.00716.33
7.2.260.0080.00816.32
7.2.250.0090.00616.26
7.2.240.0110.00416.25
7.2.230.0090.00516.31
7.2.220.0110.00416.30
7.2.210.0110.00416.39
7.2.200.0100.00716.53
7.2.190.0140.00216.43
7.2.180.0130.00116.46
7.2.170.0150.00216.55
7.2.160.0130.00316.42
7.2.150.0070.00817.36
7.2.140.0100.00417.42
7.2.130.0120.00317.60
7.2.120.0120.00317.49
7.2.110.0100.00517.61
7.2.100.0140.00117.64
7.2.90.0130.00317.35
7.2.80.0140.00417.46
7.2.70.0090.00717.47
7.2.60.0100.00517.32
7.2.50.0200.00417.15
7.2.40.0100.00617.48
7.2.30.0130.00417.49
7.2.20.0130.00317.52
7.2.10.0100.00517.65
7.2.00.0090.00717.38
7.1.330.0140.00116.88
7.1.320.0080.00616.85
7.1.310.0140.00016.84
7.1.300.0100.00416.73
7.1.290.0110.00416.84
7.1.280.0250.00016.80
7.1.270.0110.00316.68
7.1.260.0100.00616.79
7.1.250.0110.00416.76
7.1.240.0120.00216.68
7.1.230.0130.00316.80
7.1.220.0140.00216.75
7.1.210.0110.00516.69
7.1.200.0100.00316.45
7.1.190.0120.00316.71
7.1.180.0090.00616.78
7.1.170.0160.00016.67
7.1.160.0150.00016.69
7.1.150.0120.00416.78
7.1.140.0140.00216.70
7.1.130.0110.00516.76
7.1.120.0090.00716.81
7.1.110.0080.00716.78
7.1.100.0100.00516.81
7.1.90.0120.00216.66
7.1.80.0120.00316.69
7.1.70.0080.00616.84
7.1.60.0340.00822.18
7.1.50.0230.00522.13
7.1.40.0180.00822.02
7.1.30.0210.00822.10
7.1.20.0270.00822.05
7.1.10.0160.00616.04
7.1.00.0190.00616.04
7.0.330.0110.00416.62
7.0.320.0150.00016.64
7.0.310.0090.00516.55
7.0.300.0120.00216.59
7.0.290.0150.00016.51
7.0.280.0090.00516.59
7.0.270.0070.00816.58
7.0.260.0090.00616.57
7.0.250.0120.00616.72
7.0.240.0080.00616.72
7.0.230.0120.00216.71
7.0.220.0140.00016.75
7.0.210.0110.00316.57
7.0.200.0480.00416.16
7.0.190.0160.00616.04
7.0.180.0220.00615.94
7.0.170.0170.00815.93
7.0.160.0160.00715.91
7.0.150.0190.00415.82
7.0.140.0220.00615.86
7.0.130.0170.00515.99
7.0.120.0200.00716.03
7.0.110.0180.00515.96
7.0.100.0180.00716.01
7.0.90.0170.00715.93
7.0.80.0170.00715.86
7.0.70.0180.00615.76
7.0.60.0190.00615.85
7.0.50.0210.00515.82
7.0.40.0140.00915.98
7.0.30.0200.00515.95
7.0.20.0150.01015.93
7.0.10.0220.00715.96
7.0.00.0210.00915.96
5.6.400.0090.00616.09
5.6.390.0100.00416.11
5.6.380.0120.00316.11
5.6.370.0110.00415.98
5.6.360.0130.00315.96
5.6.350.0110.00416.11
5.6.340.0110.00415.97
5.6.330.0110.00316.11
5.6.320.0110.00416.10
5.6.310.0060.01015.99
5.6.300.0140.00115.93
5.6.290.0120.00216.10
5.6.280.0100.00416.04
5.6.270.0100.00616.03
5.6.260.0040.01016.06
5.6.250.0100.00416.06
5.6.240.0110.00316.06
5.6.230.0100.00316.19
5.6.220.0090.00516.20
5.6.210.0130.00216.16
5.6.200.0080.00516.23
5.6.190.0100.00316.12
5.6.180.0100.00416.16
5.6.170.0100.00316.10
5.6.160.0090.00516.18
5.6.150.0140.00116.22
5.6.140.0070.00716.15
5.6.130.0100.00416.18
5.6.120.0080.00516.17
5.6.110.0110.00316.05
5.6.100.0110.00216.15
5.6.90.0070.00716.06
5.6.80.0130.00016.00
5.6.70.0080.00516.16
5.6.60.0110.00216.05
5.6.50.0100.00316.05
5.6.40.0050.00816.06
5.6.30.0120.00116.01
5.6.20.0100.00316.09
5.6.10.0090.00316.02
5.6.00.0120.00216.12

preferences:
30.08 ms | 403 KiB | 5 Q