3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = <<<EOT <p>The breed was first...</p> <p>Semencic credits his...</p> <h1>Appearance</h1> <p>The breed's distinctive...</p> <p>It should be symmetrical...</p> <figure id="attachment_6" style="width: 840px" class="wp-caption alignnone"> <img class="size-large wp-image-6" src="...jpg" alt="boerboel appearance" width="840" height="746"> <figcaption class="wp-caption-text">The dog appearance.</figcaption> </figure> <h1>Requirements</h1> <p>Prospective owners....</p> <p>These dogs....</p> <h2>A Little Warning!</h2> <p>If you are considering...</p> <blockquote> <p>According to...</p> <p>Source: http://...</p> </blockquote> <p>Although more suitable...</p> EOT; $doc = new DOMDocument(); libxml_use_internal_errors(1); $doc->loadHTML( "<body>$txt</body>", LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); $xpath = new DOMXpath( $doc ); $nodes = $xpath->query( "/*/*" ); foreach( $nodes as $key => $node ) echo $node->nodeName . 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.3.70.0220.00016.86
8.3.60.0130.00619.05
8.3.50.0120.00722.17
8.3.40.0040.01819.21
8.3.30.0120.00619.21
8.3.20.0080.00019.12
8.3.10.0070.00722.26
8.3.00.0150.00318.14
8.2.190.0110.00820.87
8.2.180.0160.00616.88
8.2.170.0120.00322.96
8.2.160.0140.00721.43
8.2.150.0040.00424.18
8.2.140.0110.00024.66
8.2.130.0070.00720.14
8.2.120.0070.00026.35
8.2.110.0080.00320.89
8.2.100.0040.00817.97
8.2.90.0030.00618.40
8.2.80.0000.00818.57
8.2.70.0030.00518.18
8.2.60.0030.00518.05
8.2.50.0080.00418.10
8.2.40.0050.00221.01
8.2.30.0000.00820.39
8.2.20.0000.00818.00
8.2.10.0040.00418.45
8.2.00.0040.00418.54
8.1.280.0070.01525.92
8.1.270.0060.00324.36
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00322.85
8.1.230.0070.00421.39
8.1.220.0050.00318.28
8.1.210.0040.00419.10
8.1.200.0000.00917.85
8.1.190.0070.00317.60
8.1.180.0030.00518.10
8.1.170.0000.00919.14
8.1.160.0000.00722.57
8.1.150.0070.00019.36
8.1.140.0000.00720.11
8.1.130.0030.00318.15
8.1.120.0040.00417.77
8.1.110.0030.00617.89
8.1.100.0040.00417.86
8.1.90.0070.00017.85
8.1.80.0050.00317.86
8.1.70.0070.00017.88
8.1.60.0000.00817.96
8.1.50.0060.00317.98
8.1.40.0030.00617.98
8.1.30.0050.00318.07
8.1.20.0000.00818.06
8.1.10.0060.00317.89
8.1.00.0040.00417.93
8.0.300.0080.00020.33
8.0.290.0080.00017.25
8.0.280.0000.00718.86
8.0.270.0000.00717.66
8.0.260.0030.00317.86
8.0.250.0030.00417.32
8.0.240.0030.00317.41
8.0.230.0040.00417.46
8.0.220.0000.00717.37
8.0.210.0040.00417.23
8.0.200.0000.00817.29
8.0.190.0030.00517.43
8.0.180.0070.00017.31
8.0.170.0040.00417.32
8.0.160.0040.00417.39
8.0.150.0040.00717.34
8.0.140.0070.00017.33
8.0.130.0000.00613.75
8.0.120.0040.00417.21
8.0.110.0000.00717.24
8.0.100.0000.00717.40
8.0.90.0050.00317.16
8.0.80.0090.00617.39
8.0.70.0040.00417.21
8.0.60.0000.00817.47
8.0.50.0070.00017.43
8.0.30.0070.01017.46
8.0.20.0070.01217.59
8.0.10.0040.00417.37
8.0.00.0140.00417.38
7.4.330.0030.00315.08
7.4.320.0000.00617.05
7.4.300.0000.00616.92
7.4.290.0070.00016.81
7.4.280.0040.00716.92
7.4.270.0080.00316.99
7.4.260.0000.01017.00
7.4.250.0040.00416.82
7.4.240.0040.00416.87
7.4.230.0000.00817.11
7.4.220.0090.01817.11
7.4.210.0130.00317.00
7.4.200.0030.00316.91
7.4.160.0130.00916.99
7.4.150.0150.00917.40
7.4.140.0100.01117.86
7.4.130.0100.00717.08
7.4.120.0160.00116.99
7.4.110.0150.00616.84
7.4.100.0120.01216.83
7.4.90.0130.00416.83
7.4.80.0090.01419.39
7.4.70.0080.00816.97
7.4.60.0100.00716.96
7.4.50.0060.00916.68
7.4.40.0000.01716.86
7.4.30.0120.00617.00
7.4.00.0000.01315.42
7.3.330.0000.00613.61
7.3.320.0000.00613.69
7.3.310.0000.00716.84
7.3.300.0030.00316.74
7.3.290.0090.00916.80
7.3.280.0100.00616.81
7.3.270.0100.00717.40
7.3.260.0130.00616.89
7.3.250.0080.01016.91
7.3.240.0090.00916.84
7.3.230.0090.00916.77
7.3.210.0060.00916.92
7.3.200.0100.00717.08
7.3.190.0080.00816.79
7.3.180.0090.00916.76
7.3.170.0100.01316.84
7.3.160.0080.01516.98
7.3.10.0070.00716.66
7.3.00.0110.00416.75
7.2.330.0030.01416.92
7.2.320.0030.01517.15
7.2.310.0090.00917.15
7.2.300.0090.00917.05
7.2.290.0110.01116.81
7.2.130.0040.00817.11
7.2.120.0100.00317.07
7.2.110.0100.00316.93
7.2.100.0100.00617.25
7.2.90.0060.00617.00
7.2.80.0060.00917.21
7.2.70.0120.00317.09
7.2.60.0030.00917.18
7.2.50.0040.00817.25
7.2.40.0070.00717.30
7.2.30.0030.01217.08
7.2.20.0030.00917.04
7.2.10.0040.01117.06
7.2.00.0070.00716.88
7.1.250.0040.01115.87
7.1.200.0060.00615.92
7.1.70.0000.00917.39
7.1.60.0100.01619.54
7.1.00.0030.09022.62
7.0.200.0030.00616.66
7.0.60.0270.06320.22
7.0.50.0500.05020.54
7.0.40.0300.06020.53
7.0.30.0430.05720.45
7.0.20.0100.06320.46
7.0.10.0070.08320.56
7.0.00.0300.06320.58
5.6.280.0000.07721.12
5.6.210.0300.05720.88
5.6.200.0430.06021.21
5.6.190.0230.06321.18
5.6.180.0200.05321.26
5.6.170.0430.05721.29
5.6.160.0330.07321.21
5.6.150.0130.08721.21
5.6.140.0370.05721.34
5.6.130.0370.05721.18
5.6.120.0230.06721.21
5.6.110.0370.07321.32
5.6.100.0330.07021.23
5.6.90.0300.06721.22
5.6.80.0300.07320.72
5.6.70.0200.06720.69
5.6.60.0300.07720.67
5.6.50.0300.06720.58
5.6.40.0330.05320.68
5.6.30.0330.07320.65
5.6.20.0230.05020.59
5.6.10.0170.06020.65
5.6.00.0300.04720.59
5.5.350.0270.06020.57
5.5.340.0300.08021.07
5.5.330.0370.07720.95
5.5.320.0170.06720.98
5.5.310.0230.08320.93
5.5.300.0430.05320.99
5.5.290.0300.06321.02
5.5.280.0200.08021.09
5.5.270.0300.06020.99
5.5.260.0330.07021.12
5.5.250.0230.05020.99
5.5.240.0100.07020.40
5.5.230.0300.05320.36
5.5.220.0370.04720.53
5.5.210.0270.05720.38
5.5.200.0230.05720.52
5.5.190.0230.06020.29
5.5.180.0230.09020.37
5.5.160.0270.06320.30
5.5.150.0370.04320.48
5.5.140.0270.05020.44
5.5.130.0200.05720.37
5.5.120.0330.04320.36
5.5.110.0200.06020.34
5.5.100.0300.05020.25
5.5.90.0330.04320.27
5.5.80.0170.05320.24
5.5.70.0200.05720.29
5.5.60.0170.07320.25
5.5.50.0300.06020.38
5.5.40.0230.05720.36
5.5.30.0200.07720.22
5.5.20.0170.07320.28
5.5.10.0100.08020.26
5.5.00.0230.04720.19

preferences:
50.92 ms | 401 KiB | 5 Q