3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<'HTML' <div class="wrapper"> <h2>This is a header</h2> <h2>This is one too</h2> <h4>Here's one</h4> <div class="ignore"> <h5>I'm one in here too</h5> </div> </div> HTML; $dom = new DOMDocument; $dom->loadHTML($html); $xp = new DOMXPath($dom); $nodeList = $xp->query(' //* [contains(";h1;h2;h3;h4;h5;h6;", concat(";", local-name(), ";"))] [not(ancestor::div[ contains(concat(" ", normalize-space(@class), " "), " ignore ") ]) ]'); foreach ($nodeList as $node) { echo 'tag name: ', $node->nodeName, PHP_EOL, 'html content: ', $dom->saveHTML($node), PHP_EOL, 'text content: ', $node->textContent, PHP_EOL, PHP_EOL; }

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.0080.01019.19
8.5.00.0100.00720.18
8.4.150.0030.00014.05
8.4.140.0130.00918.05
8.4.130.0120.00918.24
8.4.120.0130.00820.77
8.4.110.0080.00522.58
8.4.100.0100.01117.82
8.4.90.0130.00822.63
8.4.80.0060.00219.91
8.4.70.0080.01018.25
8.4.60.0130.00819.30
8.4.50.0030.00819.10
8.4.40.0090.00017.97
8.4.30.0130.00618.79
8.4.20.0160.00419.98
8.4.10.0100.00618.22
8.3.280.0110.01018.77
8.3.270.0130.00716.95
8.3.260.0120.00816.81
8.3.250.0130.00719.29
8.3.240.0140.00516.96
8.3.230.0120.00716.96
8.3.220.0110.00817.47
8.3.210.0080.01118.81
8.3.200.0070.00417.04
8.3.190.0110.01317.37
8.3.180.0110.00816.70
8.3.170.0130.00617.30
8.3.160.0110.00718.71
8.3.150.0120.00617.46
8.3.140.0160.00317.68
8.3.130.0060.00317.08
8.3.120.0060.01219.35
8.3.110.0130.00316.91
8.3.100.0060.00616.63
8.3.90.0160.00318.72
8.3.80.0030.00618.56
8.3.70.0130.00616.88
8.3.60.0130.00718.93
8.3.50.0090.00823.74
8.3.40.0040.01121.30
8.3.30.0110.00418.96
8.3.20.0040.00421.15
8.3.10.0080.00020.59
8.3.00.0050.00320.88
8.2.290.0120.00720.83
8.2.280.0050.01219.02
8.2.270.0110.01117.43
8.2.260.0060.00316.99
8.2.250.0040.00417.13
8.2.240.0060.00316.98
8.2.230.0090.00020.94
8.2.220.0100.00624.06
8.2.210.0040.00426.77
8.2.200.0060.00316.88
8.2.190.0130.00616.61
8.2.180.0110.00718.80
8.2.170.0220.00022.96
8.2.160.0090.00619.67
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0060.00322.58
8.2.100.0040.00717.97
8.2.90.0030.00518.00
8.2.80.0040.00419.54
8.2.70.0000.00817.75
8.2.60.0030.00717.88
8.2.50.0040.00418.05
8.2.40.0030.00518.59
8.2.30.0040.00419.68
8.2.20.0080.00018.40
8.2.10.0030.00519.56
8.2.00.0050.00319.63
8.1.330.0090.00622.39
8.1.320.0140.00516.53
8.1.310.0120.00918.70
8.1.300.0050.00516.76
8.1.290.0090.00318.88
8.1.280.0140.00025.92
8.1.270.0040.00420.89
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00624.11
8.1.230.0060.00619.38
8.1.220.0000.00817.91
8.1.210.0050.00518.77
8.1.200.0060.00317.48
8.1.190.0040.00417.60
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0050.00319.36
8.1.150.0040.00419.14
8.1.140.0040.00419.24
8.1.130.0000.00717.79
8.1.120.0000.00717.73
8.1.110.0040.00417.82
8.1.100.0030.00517.75
8.1.90.0040.00417.75
8.1.80.0040.00417.83
8.1.70.0040.00417.74
8.1.60.0000.00817.88
8.1.50.0080.00017.80
8.1.40.0040.00417.74
8.1.30.0040.00418.05
8.1.20.0040.00418.04
8.1.10.0000.00917.92
8.1.00.0030.00617.88
8.0.300.0030.00520.29
8.0.290.0030.00517.25
8.0.280.0000.00718.77
8.0.270.0000.00718.38
8.0.260.0040.00417.26
8.0.250.0030.00317.30
8.0.240.0000.00717.40
8.0.230.0030.00317.39
8.0.220.0070.00017.25
8.0.210.0000.00717.34
8.0.200.0030.00317.39
8.0.190.0070.00017.38
8.0.180.0000.00817.32
8.0.170.0090.00017.30
8.0.160.0040.00417.24
8.0.150.0040.00417.34
8.0.140.0070.00017.29
8.0.130.0060.00013.75
8.0.120.0000.00717.36
8.0.110.0040.00417.35
8.0.100.0000.00717.24
8.0.90.0030.00617.39
8.0.80.0070.00717.27
8.0.70.0000.00717.31
8.0.60.0040.00417.40
8.0.50.0040.00417.04
8.0.30.0080.01517.59
8.0.20.0130.00617.25
8.0.10.0080.00017.38
8.0.00.0100.01317.27
7.4.330.0050.00015.55
7.4.320.0030.00316.97
7.4.300.0040.00416.92
7.4.290.0000.00716.74
7.4.280.0100.00016.90
7.4.270.0070.00416.85
7.4.260.0000.00513.58
7.4.250.0040.00416.68
7.4.240.0040.00416.98
7.4.230.0000.00716.62
7.4.220.0050.00216.79
7.4.210.0070.01216.95
7.4.200.0040.00416.97
7.4.130.0130.01016.89
7.4.120.0070.01316.84
7.4.110.0090.00916.75
7.4.100.0080.00816.96
7.4.90.0140.00416.85
7.4.80.0090.00919.39
7.4.70.0110.00617.01
7.4.60.0090.00817.01
7.4.50.0120.00616.86
7.4.40.0050.01016.52
7.4.30.0090.00616.96
7.4.20.0030.01816.63
7.4.10.0080.00817.00
7.4.00.0090.00616.78
7.3.330.0030.00516.75
7.3.320.0030.00313.54
7.3.310.0040.00416.77
7.3.300.0050.00216.77
7.3.290.0050.01116.70
7.3.280.0060.01316.57
7.3.260.0110.00616.95
7.3.240.0100.00916.78
7.3.230.0170.00216.81
7.3.210.0070.01116.63
7.3.200.0060.01416.64
7.3.190.0030.01316.66
7.3.180.0100.00716.78
7.3.170.0090.00916.81
7.3.160.0110.00616.83
7.3.150.0160.00016.71
7.3.140.0090.00816.69
7.3.130.0040.01216.67
7.3.120.0000.02216.71
7.3.110.0120.00416.80
7.3.100.0170.00316.64
7.3.90.0110.00616.88
7.3.80.0210.00017.00
7.3.70.0120.00416.77
7.3.60.0090.00616.54
7.3.50.0120.00616.84
7.3.40.0120.01116.53
7.3.30.0090.00916.76
7.3.20.0070.01116.81
7.3.10.0060.01816.71
7.3.00.0080.00816.82
7.2.330.0060.01217.04
7.2.310.0040.01217.05
7.2.300.0060.01216.95
7.2.290.0140.00916.83
7.2.280.0030.01617.13
7.2.270.0070.01017.12
7.2.260.0080.00816.87
7.2.250.0070.01017.10
7.2.240.0110.00616.92
7.2.230.0040.01717.02
7.2.220.0140.00617.02
7.2.210.0030.01317.11
7.2.200.0040.01216.72
7.2.190.0130.00616.91
7.2.180.0070.01016.83
7.2.170.0090.00916.99
7.2.160.0030.01416.93
7.2.150.0140.01117.10
7.2.140.0110.01516.96
7.2.130.0640.01817.06
7.2.120.0050.02016.93
7.2.110.0170.00616.98
7.2.100.0130.01317.11
7.2.90.0120.01416.89
7.2.80.0150.00716.92
7.2.70.0120.01117.12
7.2.60.0090.01517.13
7.2.50.0090.01517.02
7.2.40.0120.00917.07
7.2.30.0150.00917.04
7.2.20.0130.01216.99
7.2.10.0100.01616.89
7.2.00.0030.02017.09

preferences:
37.97 ms | 403 KiB | 5 Q