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->nodeValue); //$html = $dom->saveXML($book); //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.0110.00716.88
8.3.50.0060.00916.76
8.3.40.0100.01019.00
8.3.30.0100.01018.89
8.3.20.0080.00020.73
8.3.10.0050.00323.86
8.3.00.0040.00422.10
8.2.180.0070.01117.25
8.2.170.0140.00022.96
8.2.160.0100.00322.42
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00420.21
8.2.120.0080.00026.35
8.2.110.0100.00022.67
8.2.100.0070.00717.97
8.2.90.0050.00319.47
8.2.80.0040.00418.15
8.2.70.0080.00017.88
8.2.60.0080.00018.18
8.2.50.0080.00018.41
8.2.40.0000.00720.99
8.2.30.0040.00419.62
8.2.20.0040.00418.40
8.2.10.0050.00218.51
8.2.00.0000.00818.01
8.1.280.0120.00325.92
8.1.270.0080.00022.52
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0060.00321.28
8.1.230.0080.00419.46
8.1.220.0060.00318.01
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0030.00617.35
8.1.180.0040.00418.10
8.1.170.0080.00018.95
8.1.160.0040.00422.44
8.1.150.0050.00320.71
8.1.140.0050.00219.92
8.1.130.0000.00718.00
8.1.120.0040.00417.84
8.1.110.0040.00517.78
8.1.100.0050.00217.63
8.1.90.0030.00617.79
8.1.80.0050.00317.62
8.1.70.0040.00417.82
8.1.60.0040.00417.71
8.1.50.0000.00817.66
8.1.40.0000.00917.91
8.1.30.0030.00617.83
8.1.20.0000.00817.75
8.1.10.0060.00317.74
8.1.00.0030.00517.70
8.0.300.0000.00720.41
8.0.290.0070.00016.85
8.0.280.0080.00018.78
8.0.270.0030.00317.52
8.0.260.0040.00418.77
8.0.250.0000.00717.29
8.0.240.0040.00417.13
8.0.230.0030.00317.27
8.0.220.0000.00717.07
8.0.210.0040.00417.06
8.0.200.0030.00317.31
8.0.190.0040.00417.31
8.0.180.0080.00017.29
8.0.170.0040.00417.25
8.0.160.0000.00717.10
8.0.150.0000.00717.29
8.0.140.0030.00516.95
8.0.130.0030.00313.68
8.0.120.0000.00817.24
8.0.110.0080.00017.26
8.0.100.0000.00717.09
8.0.90.0030.00517.10
8.0.80.0030.01317.23
8.0.70.0000.00717.07
8.0.60.0070.00017.17
8.0.50.0000.00717.04
8.0.30.0080.00817.31
8.0.20.0120.00817.50
8.0.10.0040.00417.24
8.0.00.0180.00617.11
7.4.330.0080.00015.55
7.4.320.0030.00316.82
7.4.300.0030.00316.82
7.4.290.0030.00316.91
7.4.280.0000.01016.93
7.4.270.0040.00416.75
7.4.260.0070.00316.72
7.4.250.0000.00816.82
7.4.240.0000.00716.79
7.4.230.0040.00416.90
7.4.220.0190.00816.71
7.4.210.0150.00616.80
7.4.200.0040.00416.64
7.4.160.0090.00816.83
7.4.150.0090.01017.40
7.4.140.0130.00617.86
7.4.130.0060.01216.71
7.4.120.0120.00616.81
7.4.110.0150.00916.61
7.4.100.0060.00916.71
7.4.90.0090.00916.74
7.4.80.0030.01319.39
7.4.70.0040.01216.65
7.4.60.0060.00916.65
7.4.50.0080.00316.45
7.4.40.0050.01116.76
7.4.30.0080.00816.68
7.4.00.0130.00415.09
7.3.330.0000.00613.27
7.3.320.0000.00513.28
7.3.310.0020.00516.21
7.3.300.0060.00016.45
7.3.290.0070.01016.48
7.3.280.0100.00916.50
7.3.270.0090.00917.40
7.3.260.0090.00916.56
7.3.250.0120.00416.63
7.3.240.0100.00816.62
7.3.230.0100.00716.48
7.3.210.0140.00316.41
7.3.200.0100.00716.69
7.3.190.0170.00016.51
7.3.180.0060.01116.51
7.3.170.0090.00616.68
7.3.160.0090.00716.84
7.3.120.0090.00615.01
7.3.110.0130.00315.05
7.3.100.0030.00614.52
7.3.90.0030.00914.78
7.3.80.0040.01114.69
7.3.70.0030.01014.68
7.3.60.0030.01514.54
7.3.50.0030.00714.91
7.3.40.0030.01214.85
7.3.30.0140.00314.90
7.3.20.0100.00616.54
7.3.10.0070.00716.45
7.3.00.0120.00316.79
7.2.330.0030.01516.92
7.2.320.0060.01216.85
7.2.310.0170.00417.08
7.2.300.0090.00917.06
7.2.290.0070.01016.70
7.2.250.0090.00715.01
7.2.240.0080.00815.16
7.2.230.0100.00015.34
7.2.220.0120.00414.90
7.2.210.0100.00715.03
7.2.200.0100.00715.34
7.2.190.0090.00614.95
7.2.180.0040.01515.05
7.2.170.0090.00315.18
7.2.60.0180.00416.44
7.2.50.0120.00317.05
7.2.00.0120.00318.93
7.1.330.0070.00715.84
7.1.320.0070.01015.91
7.1.310.0140.00415.95
7.1.300.0040.01115.92
7.1.290.0080.00815.86
7.1.280.0080.00515.86
7.1.270.0040.01116.11
7.1.260.0030.01315.93
7.1.200.0070.00415.80
7.1.70.0050.00517.22
7.1.60.0100.00017.21
7.1.00.0070.07322.57
7.0.200.0040.00716.88
7.0.120.0030.05722.31
7.0.110.0070.06322.19
7.0.100.0030.06022.22
7.0.90.0070.06722.20
7.0.80.0100.05722.27
7.0.70.0030.06322.29
7.0.60.0100.06322.16
7.0.50.0030.07322.14
7.0.40.0130.05022.24
7.0.30.0100.05322.30
7.0.20.0170.04322.18
7.0.10.0100.05322.26
7.0.00.0000.06022.16
5.6.270.0000.06321.20
5.6.260.0100.05321.02
5.6.250.0070.07721.02
5.6.240.0130.06021.08
5.6.230.0100.05320.99
5.6.220.0070.06321.13
5.6.210.0070.05321.01
5.6.200.0130.08021.07
5.6.190.0100.07721.09
5.6.180.0130.04721.16
5.6.170.0100.05020.93
5.6.160.0070.05720.93
5.6.150.0130.06720.98
5.6.140.0100.05721.16
5.6.130.0030.07021.13
5.6.120.0030.06720.98
5.6.110.0100.05321.07
5.6.100.0100.05721.15
5.6.90.0030.05720.96
5.6.80.0070.05720.47
5.6.70.0130.05320.55
5.6.60.0100.05320.49
5.6.50.0100.05020.36
5.6.40.0000.06020.34
5.6.30.0170.07020.52
5.6.20.0070.08320.43
5.6.10.0030.08320.41
5.6.00.0030.05720.38

preferences:
56.23 ms | 400 KiB | 5 Q