3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str='<root> <book id="1"> <title>..1.</title> <author>.1..</author> </book> <book id="2"> <title>.2..</title> <author>.2..</author> </book> <book id="3"> <title>.3..</title> <author>.3..</author> </book> </root>'; $dom = new DOMDocument; $dom->loadXML($str); $xpath = new DOMXPath($dom); $book = $xpath->query("//book[@id='2']")->item(0); //$html = ""; foreach($book->childNodes as $node) { $html .= $dom->saveHTML($node); } echo $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.3.60.0160.00616.88
8.3.50.0140.00521.34
8.3.40.0110.00419.36
8.3.30.0040.01119.00
8.3.20.0040.00420.69
8.3.10.0060.00322.15
8.3.00.0080.00022.23
8.2.180.0110.00416.88
8.2.170.0080.00822.96
8.2.160.0130.00722.64
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.56
8.2.110.0070.00320.64
8.2.100.0070.00318.28
8.2.90.0080.00018.28
8.2.80.0030.00619.58
8.2.70.0030.00518.28
8.2.60.0040.00418.30
8.2.50.0040.00419.58
8.2.40.0030.00520.84
8.2.30.0050.00319.61
8.2.20.0040.00418.55
8.2.10.0040.00418.54
8.2.00.0000.00718.20
8.1.280.0110.01125.92
8.1.270.0000.00822.46
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.89
8.1.230.0070.00421.41
8.1.220.0040.00418.16
8.1.210.0040.00418.95
8.1.200.0000.00917.49
8.1.190.0030.00617.38
8.1.180.0040.00418.10
8.1.170.0040.00418.93
8.1.160.0080.00022.48
8.1.150.0000.00822.42
8.1.140.0040.00419.92
8.1.130.0000.00818.18
8.1.120.0040.00417.91
8.1.110.0000.00917.89
8.1.100.0040.00417.73
8.1.90.0000.00817.89
8.1.80.0030.00317.81
8.1.70.0030.00617.81
8.1.60.0000.00818.02
8.1.50.0040.00417.84
8.1.40.0050.00317.73
8.1.30.0080.00018.09
8.1.20.0000.00817.94
8.1.10.0000.00717.95
8.1.00.0040.00417.71
8.0.300.0060.00320.50
8.0.290.0050.00317.00
8.0.280.0030.00318.75
8.0.270.0000.00717.68
8.0.260.0000.00717.59
8.0.250.0050.00317.43
8.0.240.0040.00417.20
8.0.230.0000.00717.39
8.0.220.0000.00917.14
8.0.210.0030.00317.28
8.0.200.0070.00017.38
8.0.190.0000.00817.44
8.0.180.0040.00417.27
8.0.170.0040.00417.38
8.0.160.0000.00717.29
8.0.150.0000.00717.29
8.0.140.0000.00717.28
8.0.130.0030.00313.70
8.0.120.0040.00417.07
8.0.110.0070.00017.23
8.0.100.0050.00217.16
8.0.90.0070.00017.32
8.0.80.0030.01317.34
8.0.70.0000.00817.19
8.0.60.0040.00417.36
8.0.50.0000.00717.24
8.0.30.0120.00817.57
8.0.20.0110.01117.52
8.0.10.0000.00717.42
8.0.00.0060.01217.09
7.4.330.0000.00815.55
7.4.320.0040.00416.88
7.4.300.0030.00316.95
7.4.290.0000.00716.78
7.4.280.0080.00316.91
7.4.270.0000.00916.80
7.4.260.0030.00616.88
7.4.250.0030.00316.71
7.4.240.0080.00017.02
7.4.230.0030.00316.80
7.4.220.0150.01217.04
7.4.210.0070.01016.92
7.4.200.0040.00416.80
7.4.160.0070.01017.07
7.4.150.0180.00617.40
7.4.140.0070.01117.86
7.4.130.0070.01116.86
7.4.120.0090.01016.90
7.4.110.0110.00716.87
7.4.100.0110.00816.93
7.4.90.0090.00916.62
7.4.80.0030.01519.39
7.4.70.0070.01016.91
7.4.60.0100.00616.98
7.4.50.0120.00316.86
7.4.40.0140.00316.79
7.4.30.0080.00816.60
7.4.00.0100.00715.06
7.3.330.0000.00613.36
7.3.320.0030.00313.46
7.3.310.0030.00516.62
7.3.300.0040.00416.55
7.3.290.0070.00916.73
7.3.280.0110.00816.68
7.3.270.0080.01217.40
7.3.260.0160.00616.81
7.3.250.0100.00816.71
7.3.240.0060.01316.83
7.3.230.0120.00616.62
7.3.210.0100.00716.82
7.3.200.0080.01616.98
7.3.190.0090.00916.75
7.3.180.0030.01316.77
7.3.170.0130.00416.76
7.3.160.0110.00616.81
7.3.120.0070.01015.06
7.3.110.0080.00414.72
7.3.100.0040.01414.83
7.3.90.0040.01114.98
7.3.80.0040.01114.94
7.3.70.0000.01614.89
7.3.60.0070.00715.03
7.3.50.0040.01215.04
7.3.40.0060.00915.15
7.3.30.0060.00614.84
7.3.20.0120.00316.92
7.3.10.0060.00916.95
7.3.00.0080.00616.96
7.2.330.0070.01317.13
7.2.320.0120.00617.00
7.2.310.0060.01317.11
7.2.300.0110.00717.27
7.2.290.0100.01016.84
7.2.250.0120.00815.30
7.2.240.0030.01715.33
7.2.230.0000.01615.30
7.2.220.0090.00915.24
7.2.210.0080.00415.18
7.2.200.0100.01015.26
7.2.190.0100.00315.18
7.2.180.0000.01415.34
7.2.170.0060.00915.02
7.2.60.0150.00317.00
7.2.50.0060.00616.96
7.2.00.0070.00719.70
7.1.330.0140.00016.17
7.1.320.0090.00915.99
7.1.310.0030.01316.26
7.1.300.0060.00616.02
7.1.290.0030.01016.03
7.1.280.0120.00315.83
7.1.270.0000.01215.79
7.1.260.0070.00715.91
7.1.200.0080.00315.81
7.1.70.0000.00717.22
7.1.60.0230.00017.25
7.1.00.0000.07722.61
7.0.200.0080.00316.77
7.0.120.0170.05322.16
7.0.110.0070.07322.13
7.0.100.0100.07322.15
7.0.90.0130.06722.23
7.0.80.0230.05322.19
7.0.70.0070.07022.16
7.0.60.0070.06722.09
7.0.50.0030.05722.18
7.0.40.0130.08022.21
7.0.30.0100.05722.24
7.0.20.0030.06322.24
7.0.10.0070.06322.17
7.0.00.0130.06322.16
5.6.270.0100.06321.14
5.6.260.0100.06021.20
5.6.250.0100.06021.25
5.6.240.0100.06321.05
5.6.230.0030.06320.97
5.6.220.0030.06321.02
5.6.210.0030.06321.04
5.6.200.0030.07021.15
5.6.190.0100.06021.05
5.6.180.0070.05321.16
5.6.170.0000.06021.16
5.6.160.0070.06721.16
5.6.150.0130.06020.91
5.6.140.0070.06721.15
5.6.130.0030.06321.20
5.6.120.0100.05720.94
5.6.110.0170.07321.13
5.6.100.0130.08321.08
5.6.90.0100.07321.16
5.6.80.0100.05320.55
5.6.70.0070.07720.45
5.6.60.0070.07020.29
5.6.50.0130.05720.46
5.6.40.0100.07020.52
5.6.30.0100.07320.52
5.6.20.0070.07720.50
5.6.10.0030.06020.53
5.6.00.0130.05020.39

preferences:
54.01 ms | 401 KiB | 5 Q