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->ownerDocument->innerHTML); //$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.0150.00717.13
8.3.50.0120.00416.62
8.3.40.0000.01418.71
8.3.30.0080.00818.80
8.3.20.0000.00820.74
8.3.10.0040.00422.15
8.3.00.0040.00422.23
8.2.180.0100.00717.00
8.2.170.0060.00922.96
8.2.160.0100.00322.76
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00021.19
8.2.110.0030.00722.80
8.2.100.0090.00318.22
8.2.90.0000.00818.25
8.2.80.0080.00018.95
8.2.70.0030.00617.88
8.2.60.0060.00317.75
8.2.50.0040.00419.59
8.2.40.0000.00720.97
8.2.30.0050.00219.52
8.2.20.0050.00218.50
8.2.10.0040.00418.42
8.2.00.0000.00918.21
8.1.280.0110.00425.92
8.1.270.0030.00622.48
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0110.00023.98
8.1.230.0000.01121.14
8.1.220.0080.00018.04
8.1.210.0050.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0040.00418.87
8.1.160.0030.00522.53
8.1.150.0030.00522.39
8.1.140.0040.00419.95
8.1.130.0040.00417.93
8.1.120.0000.00717.77
8.1.110.0020.00917.67
8.1.100.0040.00417.75
8.1.90.0040.00417.63
8.1.80.0000.00817.60
8.1.70.0060.00317.58
8.1.60.0000.00817.92
8.1.50.0000.00917.88
8.1.40.0000.00817.83
8.1.30.0030.00517.97
8.1.20.0040.00417.81
8.1.10.0000.00817.73
8.1.00.0040.00417.97
8.0.300.0070.00018.77
8.0.290.0030.00617.13
8.0.280.0000.00918.84
8.0.270.0000.00717.61
8.0.260.0050.00317.54
8.0.250.0070.00017.14
8.0.240.0030.00317.27
8.0.230.0040.00417.34
8.0.220.0070.00017.26
8.0.210.0030.00317.32
8.0.200.0000.00717.36
8.0.190.0060.00317.36
8.0.180.0060.00317.11
8.0.170.0030.00517.27
8.0.160.0040.00417.33
8.0.150.0030.00317.30
8.0.140.0030.00516.99
8.0.130.0000.00613.71
8.0.120.0000.00817.29
8.0.110.0000.00817.04
8.0.100.0050.00217.14
8.0.90.0000.00717.19
8.0.80.0070.01017.25
8.0.70.0000.00717.18
8.0.60.0040.00417.11
8.0.50.0000.00817.15
8.0.30.0150.00417.38
8.0.20.0100.00917.43
8.0.10.0000.00817.28
8.0.00.0100.00717.09
7.4.330.0040.00415.55
7.4.320.0000.00816.97
7.4.300.0030.00316.88
7.4.290.0040.00416.96
7.4.280.0070.00316.96
7.4.270.0050.00616.88
7.4.260.0000.01016.84
7.4.250.0080.00016.77
7.4.240.0040.00416.80
7.4.230.0030.00416.93
7.4.220.0070.01316.97
7.4.210.0060.01216.86
7.4.200.0070.00016.77
7.4.160.0120.00716.86
7.4.150.0030.01417.40
7.4.140.0120.00617.86
7.4.130.0100.01016.86
7.4.120.0110.00716.92
7.4.110.0090.01216.90
7.4.100.0110.00716.80
7.4.90.0070.01116.95
7.4.80.0030.01319.39
7.4.70.0120.00916.75
7.4.60.0120.00416.75
7.4.50.0030.01016.61
7.4.40.0080.00816.75
7.4.30.0100.00716.93
7.4.00.0090.00615.05
7.3.330.0030.00313.47
7.3.320.0060.00013.47
7.3.310.0070.00016.65
7.3.300.0030.00316.42
7.3.290.0060.00916.65
7.3.280.0120.00716.58
7.3.270.0140.01017.40
7.3.260.0080.01016.71
7.3.250.0090.01016.71
7.3.240.0050.01416.56
7.3.230.0180.00016.66
7.3.210.0110.00516.51
7.3.200.0110.00616.57
7.3.190.0070.01416.49
7.3.180.0140.00416.66
7.3.170.0130.01016.52
7.3.160.0100.01016.77
7.3.120.0060.00914.91
7.3.110.0060.01014.99
7.3.100.0070.00714.82
7.3.90.0070.00715.00
7.3.80.0080.00615.13
7.3.70.0080.00414.88
7.3.60.0000.01014.85
7.3.50.0000.00914.49
7.3.40.0100.00614.93
7.3.30.0040.01115.08
7.3.20.0100.00716.97
7.3.10.0050.01016.73
7.3.00.0040.00816.83
7.2.330.0080.00816.95
7.2.320.0060.01117.11
7.2.310.0150.01017.09
7.2.300.0130.00417.01
7.2.290.0090.00916.90
7.2.240.0070.00715.13
7.2.230.0060.00814.85
7.2.220.0030.00815.01
7.2.210.0060.00914.89
7.2.200.0040.01415.08
7.2.190.0090.00615.16
7.2.180.0070.00715.00
7.2.170.0000.01615.13
7.2.160.0120.00315.14
7.2.150.0100.00616.79
7.2.140.0070.00716.86
7.2.130.0050.00916.90
7.2.120.0050.00916.84
7.2.110.0060.00616.88
7.2.100.0050.00917.00
7.2.90.0020.01016.96
7.2.80.0060.00716.90
7.2.70.0050.00817.03
7.2.60.0070.01016.94
7.2.50.0020.01217.10
7.2.40.0060.00817.03
7.2.30.0080.00316.85
7.2.20.0040.00917.05
7.2.10.0070.00717.03
7.2.00.0030.01117.68
7.1.330.0060.01015.76
7.1.320.0100.00315.99
7.1.310.0090.00616.00
7.1.300.0040.00915.95
7.1.290.0030.01315.91
7.1.280.0000.01515.93
7.1.270.0030.00715.97
7.1.260.0000.01715.93
7.1.250.0100.00215.96
7.1.200.0030.00815.91
7.1.70.0060.00317.26
7.1.60.0030.00717.21
7.1.00.0100.07022.66
7.0.200.0030.00616.85
7.0.120.0100.06022.18
7.0.110.0070.07322.23
7.0.100.0100.05322.20
7.0.90.0070.06022.20
7.0.80.0070.05722.16
7.0.70.0030.06022.16
7.0.60.0030.06022.15
7.0.50.0100.05322.18
7.0.40.0100.05322.28
7.0.30.0100.06322.19
7.0.20.0070.06322.21
7.0.10.0170.04722.22
7.0.00.0000.08322.16
5.6.270.0100.07321.19
5.6.260.0170.05021.02
5.6.250.0170.05321.13
5.6.240.0130.05721.13
5.6.230.0130.05321.16
5.6.220.0000.06720.99
5.6.210.0100.05321.01
5.6.200.0100.05320.99
5.6.190.0130.05721.07
5.6.180.0070.05721.14
5.6.170.0030.06320.95
5.6.160.0000.06721.14
5.6.150.0130.05321.18
5.6.140.0070.07320.98
5.6.130.0070.08021.06
5.6.120.0130.06721.07
5.6.110.0100.05721.05
5.6.100.0070.06020.96
5.6.90.0030.07321.14
5.6.80.0070.06020.37
5.6.70.0170.06320.31
5.6.60.0100.06720.33
5.6.50.0100.05720.48
5.6.40.0070.07720.53
5.6.30.0100.07720.54
5.6.20.0100.06020.43
5.6.10.0070.05320.50
5.6.00.0000.06020.41

preferences:
52.11 ms | 401 KiB | 5 Q