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->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.70.0070.00717.13
8.3.60.0110.00717.00
8.3.50.0100.01221.27
8.3.40.0100.01018.95
8.3.30.0070.01519.11
8.3.20.0080.00020.91
8.3.10.0080.00024.08
8.3.00.0060.00322.27
8.2.190.0180.00617.13
8.2.180.0150.00317.13
8.2.170.0100.01022.96
8.2.160.0070.00722.50
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00420.08
8.2.120.0080.00026.35
8.2.110.0030.00621.43
8.2.100.0040.00820.82
8.2.90.0000.00719.68
8.2.80.0000.00817.97
8.2.70.0000.00918.18
8.2.60.0030.00618.34
8.2.50.0040.00419.71
8.2.40.0040.00420.80
8.2.30.0000.00919.54
8.2.20.0080.00018.38
8.2.10.0070.00018.42
8.2.00.0000.00818.13
8.1.280.0070.01725.92
8.1.270.0030.00522.37
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00622.52
8.1.230.0030.00921.32
8.1.220.0080.00018.16
8.1.210.0000.00818.77
8.1.200.0050.00517.60
8.1.190.0000.00917.24
8.1.180.0060.00318.10
8.1.170.0040.00818.76
8.1.160.0070.00022.50
8.1.150.0000.00820.71
8.1.140.0000.00819.81
8.1.130.0030.00318.04
8.1.120.0000.00817.85
8.1.110.0030.00617.82
8.1.100.0040.00417.68
8.1.90.0030.00517.60
8.1.80.0040.00417.78
8.1.70.0000.00917.81
8.1.60.0000.00917.95
8.1.50.0040.00417.89
8.1.40.0040.00417.88
8.1.30.0050.00317.96
8.1.20.0040.00417.95
8.1.10.0000.00917.73
8.1.00.0040.00417.91
8.0.300.0050.00220.07
8.0.290.0040.00417.13
8.0.280.0000.00718.71
8.0.270.0000.00717.56
8.0.260.0000.00717.52
8.0.250.0000.00717.30
8.0.240.0090.00017.11
8.0.230.0050.00217.18
8.0.220.0000.00717.11
8.0.210.0070.00016.99
8.0.200.0040.00417.10
8.0.190.0030.00517.36
8.0.180.0040.00417.12
8.0.170.0000.00817.36
8.0.160.0000.00717.28
8.0.150.0040.00417.21
8.0.140.0000.00817.07
8.0.130.0030.00313.62
8.0.120.0000.00817.25
8.0.110.0040.00417.18
8.0.100.0080.00017.26
8.0.90.0040.00417.13
8.0.80.0090.00617.20
8.0.70.0000.00817.29
8.0.60.0050.00317.20
8.0.50.0050.00317.17
8.0.30.0080.00817.36
8.0.20.0100.00917.40
8.0.10.0040.00417.33
8.0.00.0150.00317.01
7.4.330.0080.00015.55
7.4.320.0030.00316.80
7.4.300.0000.00716.82
7.4.290.0050.00316.86
7.4.280.0100.00016.77
7.4.270.0030.00616.91
7.4.260.0030.00316.74
7.4.250.0000.00716.81
7.4.240.0050.00316.84
7.4.230.0070.00017.01
7.4.220.0180.00616.82
7.4.210.0100.00716.80
7.4.200.0030.00316.68
7.4.160.0080.01116.80
7.4.150.0130.00617.40
7.4.140.0060.01117.86
7.4.130.0100.00916.78
7.4.120.0070.01216.78
7.4.110.0120.01216.77
7.4.100.0050.01116.90
7.4.90.0070.01116.70
7.4.80.0090.01419.39
7.4.70.0140.00316.73
7.4.60.0060.01016.80
7.4.50.0030.01016.64
7.4.40.0130.00316.81
7.4.30.0060.01016.79
7.4.00.0080.00815.21
7.3.330.0060.00013.21
7.3.320.0060.00013.44
7.3.310.0030.00316.32
7.3.300.0000.00716.51
7.3.290.0100.00616.47
7.3.280.0090.00916.55
7.3.270.0090.00917.40
7.3.260.0080.01216.58
7.3.250.0070.01016.63
7.3.240.0090.00916.83
7.3.230.0140.01016.54
7.3.210.0110.00716.52
7.3.200.0140.00316.63
7.3.190.0110.00516.66
7.3.180.0040.01216.68
7.3.170.0060.01216.62
7.3.160.0030.01316.60
7.3.120.0070.01014.75
7.3.110.0060.01214.91
7.3.100.0110.00814.70
7.3.90.0120.00414.86
7.3.80.0070.00714.93
7.3.70.0070.00714.86
7.3.60.0070.01014.95
7.3.50.0030.01414.76
7.3.40.0070.00714.95
7.3.30.0000.01214.64
7.3.20.0070.00716.66
7.3.10.0150.00016.64
7.3.00.0060.00916.55
7.2.330.0070.01017.14
7.2.320.0070.01416.76
7.2.310.0140.00816.72
7.2.300.0140.00316.88
7.2.290.0070.01016.91
7.2.250.0060.01115.13
7.2.240.0060.00915.22
7.2.230.0060.01115.28
7.2.220.0090.00615.01
7.2.210.0000.01514.89
7.2.200.0000.01314.96
7.2.190.0000.01714.86
7.2.180.0090.00615.34
7.2.170.0110.00315.02
7.2.160.0040.00714.73
7.2.150.0060.01016.92
7.2.140.0120.00616.85
7.2.130.0100.00316.74
7.2.120.0000.01416.93
7.2.110.0030.01216.80
7.2.100.0050.00516.79
7.2.90.0090.00616.90
7.2.80.0060.00916.84
7.2.70.0040.01117.01
7.2.60.0050.00916.89
7.2.50.0100.00317.00
7.2.40.0030.00916.91
7.2.30.0130.00316.98
7.2.20.0120.00316.71
7.2.10.0060.00616.86
7.2.00.0080.01216.88
7.1.330.0070.01015.94
7.1.320.0060.00915.76
7.1.310.0070.01015.95
7.1.300.0000.01615.93
7.1.290.0030.00615.93
7.1.280.0040.00415.82
7.1.270.0070.00716.03
7.1.260.0040.01115.85
7.1.250.0060.00615.87
7.1.240.0070.00715.89
7.1.230.0000.01415.87
7.1.220.0030.01015.83
7.1.210.0150.00015.80
7.1.200.0110.00815.94
7.1.190.0030.00616.05
7.1.180.0040.01115.95
7.1.170.0100.00315.89
7.1.160.0000.01315.72
7.1.150.0060.00915.83
7.1.140.0000.01015.90
7.1.130.0030.01015.64
7.1.120.0040.01415.84
7.1.110.0070.01015.84
7.1.100.0100.00715.95
7.1.90.0070.01015.82
7.1.80.0070.00715.92
7.1.70.0030.00916.60
7.1.60.0030.00816.57
7.1.50.0120.00315.88
7.1.40.0100.00615.93
7.1.30.0060.00615.93
7.1.20.0070.00716.02
7.1.10.0070.00715.84
7.1.00.0070.03919.21
7.0.330.0070.00715.64
7.0.320.0030.01015.47
7.0.310.0080.00415.30
7.0.300.0030.01015.53
7.0.290.0100.00515.54
7.0.280.0000.01315.63
7.0.270.0070.00715.41
7.0.260.0040.01115.45
7.0.250.0040.00415.64
7.0.240.0080.00515.70
7.0.230.0080.00615.59
7.0.220.0090.00915.48
7.0.210.0110.00415.60
7.0.200.0060.00616.18
7.0.190.0080.00315.64
7.0.180.0060.00915.33
7.0.170.0000.01315.33
7.0.160.0060.00615.68
7.0.150.0000.01015.79
7.0.140.0060.00615.64
7.0.130.0110.00015.61
7.0.120.0450.03218.89
7.0.110.0100.02818.84
7.0.100.0070.03118.85
7.0.90.0050.03218.90
7.0.80.0020.03518.85
7.0.70.0030.03118.91
7.0.60.0060.03018.91
7.0.50.0100.03518.84
7.0.40.0040.04117.85
7.0.30.0050.03317.88
7.0.20.0020.03517.86
7.0.10.0120.02317.89
7.0.00.0050.03017.99
5.6.400.0030.00914.32
5.6.390.0030.01014.10
5.6.380.0090.00614.27
5.6.370.0070.01014.39
5.6.360.0030.01014.33
5.6.350.0080.00414.27
5.6.340.0100.00714.41
5.6.330.0030.00914.55
5.6.320.0060.01014.40
5.6.310.0070.00714.59
5.6.300.0000.01314.32
5.6.290.0060.00314.51
5.6.280.0030.00714.29
5.6.270.0090.02917.75
5.6.260.0120.03417.78
5.6.250.0080.03017.80
5.6.240.0080.03317.76
5.6.230.0000.04417.88
5.6.220.0000.03917.65
5.6.210.0070.03417.71
5.6.200.0020.03417.94
5.6.190.0060.03417.80
5.6.180.0070.03017.81
5.6.170.0080.03017.79
5.6.160.0090.03117.71
5.6.150.0100.04017.69
5.6.140.0070.03617.77
5.6.130.0050.03617.78
5.6.120.0050.03517.67
5.6.110.0050.03717.65
5.6.100.0100.03117.68
5.6.90.0100.02917.63
5.6.80.0070.03017.35
5.6.70.0000.03317.35
5.6.60.0070.03017.37
5.6.50.0040.03217.39
5.6.40.0070.03017.34
5.6.30.0110.02717.49
5.6.20.0020.04117.37
5.6.10.0060.03017.38
5.6.00.0020.03517.35

preferences:
63.52 ms | 401 KiB | 5 Q