3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str='<root> <book id="1"> <title id="aaa">...</title> <author>...</author> </book> <book id="2"> <title>...</title> <author>...</author> </book> <book id="3"> <title>...</title> <author>...</author> </book> </root>'; $dom = new DOMDocument; $dom->loadXML($str); $xpath = new DOMXPath($dom); $book = $xpath->query("//book[@id='2']")->item(0); //var_dump($book); $html = $dom->saveXML($book->childNodes); print_r($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.0090.01216.88
8.3.50.0140.00521.16
8.3.40.0100.01019.21
8.3.30.0040.01119.17
8.3.20.0080.00020.69
8.3.10.0030.00523.83
8.3.00.0040.00422.01
8.2.180.0120.00917.00
8.2.170.0120.00322.96
8.2.160.0120.00322.50
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0050.00319.97
8.2.120.0050.00326.35
8.2.110.0040.00419.34
8.2.100.0040.00718.16
8.2.90.0050.00319.29
8.2.80.0030.00518.30
8.2.70.0090.00017.75
8.2.60.0040.00418.05
8.2.50.0090.00018.53
8.2.40.0070.00021.06
8.2.30.0050.00319.70
8.2.20.0040.00418.38
8.2.10.0050.00218.63
8.2.00.0060.00318.09
8.1.280.0000.01525.92
8.1.270.0050.00322.31
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00324.12
8.1.230.0070.00421.15
8.1.220.0030.00518.16
8.1.210.0060.00319.47
8.1.200.0030.00617.72
8.1.190.0040.00417.48
8.1.180.0090.00018.10
8.1.170.0030.00518.99
8.1.160.0000.00724.27
8.1.150.0040.00422.34
8.1.140.0060.00319.90
8.1.130.0000.00718.04
8.1.120.0040.00417.59
8.1.110.0030.00617.57
8.1.100.0040.00417.50
8.1.90.0040.00417.65
8.1.80.0050.00317.55
8.1.70.0030.00617.64
8.1.60.0050.00317.86
8.1.50.0000.00817.80
8.1.40.0050.00317.88
8.1.30.0090.00018.04
8.1.20.0030.00618.02
8.1.10.0000.00817.98
8.1.00.0080.00017.70
8.0.300.0090.00020.27
8.0.290.0040.00417.00
8.0.280.0040.00418.72
8.0.270.0000.00717.48
8.0.260.0050.00218.70
8.0.250.0000.00717.19
8.0.240.0070.00017.29
8.0.230.0080.00017.30
8.0.220.0000.00717.02
8.0.210.0000.00717.07
8.0.200.0070.00017.35
8.0.190.0050.00317.31
8.0.180.0040.00417.27
8.0.170.0000.00717.31
8.0.160.0000.00717.27
8.0.150.0030.00317.04
8.0.140.0060.00317.02
8.0.130.0060.00013.71
8.0.120.0060.00317.31
8.0.110.0040.00417.18
8.0.100.0040.00417.07
8.0.90.0070.00017.21
8.0.80.0070.01017.21
8.0.70.0020.00517.14
8.0.60.0040.00417.15
8.0.50.0000.00717.09
8.0.30.0110.00517.34
8.0.20.0140.00617.41
8.0.10.0080.00017.30
8.0.00.0120.01217.13
7.4.330.0050.00215.55
7.4.320.0030.00316.87
7.4.300.0060.00016.79
7.4.290.0080.00016.79
7.4.280.0070.00316.90
7.4.270.0070.00316.83
7.4.260.0030.00316.84
7.4.250.0040.00416.94
7.4.240.0000.00816.89
7.4.230.0030.00316.66
7.4.220.0150.00416.97
7.4.210.0090.00616.89
7.4.200.0050.00216.89
7.4.160.0100.01016.94
7.4.150.0120.00617.40
7.4.140.0120.00617.86
7.4.130.0080.00916.78
7.4.120.0120.00516.88
7.4.110.0120.01216.87
7.4.100.0090.00916.98
7.4.90.0070.01116.78
7.4.80.0080.01519.39
7.4.70.0130.00917.10
7.4.60.0060.01016.78
7.4.50.0100.00716.73
7.4.40.0030.01216.85
7.4.30.0100.00716.96
7.4.00.0090.00615.09
7.3.330.0030.00313.47
7.3.320.0030.00313.59
7.3.310.0050.00216.74
7.3.300.0030.00316.68
7.3.290.0070.00916.64
7.3.280.0090.01116.66
7.3.270.0120.00617.40
7.3.260.0090.00816.57
7.3.250.0090.00816.77
7.3.240.0060.01316.81
7.3.230.0080.00816.91
7.3.210.0030.01516.64
7.3.200.0160.01016.59
7.3.190.0100.00616.72
7.3.180.0070.01416.41
7.3.170.0060.01016.52
7.3.160.0060.01316.76
7.3.10.0110.00316.58
7.3.00.0110.00316.67
7.2.330.0060.01316.62
7.2.320.0090.01317.03
7.2.310.0180.00616.71
7.2.300.0110.01117.06
7.2.290.0060.01016.63
7.2.130.0040.00816.82
7.2.120.0100.00317.09
7.2.110.0000.01116.93
7.2.100.0170.00016.92
7.2.90.0090.00616.88
7.2.80.0110.00616.72
7.2.70.0150.00916.84
7.2.60.0050.00716.91
7.2.50.0080.00816.96
7.2.40.0160.00816.59
7.2.30.0060.00916.81
7.2.20.0110.00516.98
7.2.10.0220.00616.77
7.2.00.0160.00718.36
7.1.250.0070.00715.82
7.1.200.0210.00515.55
7.1.100.0040.01417.85
7.1.70.0030.00717.08
7.1.60.0040.00817.00
7.1.50.0070.01817.09
7.1.00.0000.08022.64
7.0.200.0000.01016.91
7.0.120.0070.05322.25
7.0.110.0030.06722.19
7.0.100.0070.06022.25
7.0.90.0100.08322.23
7.0.80.0100.05322.22
7.0.70.0030.06022.32
7.0.60.0130.05722.10
7.0.50.0030.06722.20
7.0.40.0130.04722.25
7.0.30.0100.05322.25
7.0.20.0100.05022.21
7.0.10.0100.05022.21
7.0.00.0070.05322.19
5.6.270.0030.06021.22
5.6.260.0070.05721.21
5.6.250.0130.05021.13
5.6.240.0130.06320.99
5.6.230.0100.06021.09
5.6.220.0070.05721.18
5.6.210.0130.05021.07
5.6.200.0030.07021.11
5.6.190.0100.05721.18
5.6.180.0100.05321.12
5.6.170.0070.05321.18
5.6.160.0130.05021.09
5.6.150.0070.05721.15
5.6.140.0130.05021.09
5.6.130.0100.07021.09
5.6.120.0030.08021.18
5.6.110.0100.05720.99
5.6.100.0070.06020.93
5.6.90.0030.06021.05
5.6.80.0200.04020.52
5.6.70.0130.05320.53
5.6.60.0130.05020.36
5.6.50.0170.04020.52
5.6.40.0070.06320.41
5.6.30.0200.04020.34
5.6.20.0070.05720.47
5.6.10.0030.05320.27
5.6.00.0130.05720.51

preferences:
56.77 ms | 401 KiB | 5 Q