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); 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.0190.00017.13
8.3.50.0120.00621.41
8.3.40.0090.00619.05
8.3.30.0070.00719.01
8.3.20.0000.00821.09
8.3.10.0060.00322.33
8.3.00.0040.00422.27
8.2.180.0100.01017.00
8.2.170.0090.00622.96
8.2.160.0030.01022.58
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00420.33
8.2.120.0090.00026.35
8.2.110.0030.00722.62
8.2.100.0030.01018.34
8.2.90.0030.00519.70
8.2.80.0040.00418.11
8.2.70.0070.00318.13
8.2.60.0050.00318.30
8.2.50.0000.00819.59
8.2.40.0080.00020.84
8.2.30.0030.00619.60
8.2.20.0000.00718.43
8.2.10.0040.00418.43
8.2.00.0090.00018.11
8.1.280.0090.01325.92
8.1.270.0070.01122.41
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0120.00621.36
8.1.230.0080.00319.41
8.1.220.0030.00617.89
8.1.210.0030.00618.77
8.1.200.0030.00717.60
8.1.190.0000.00817.60
8.1.180.0040.00418.10
8.1.170.0040.00418.88
8.1.160.0040.00422.58
8.1.150.0070.00022.48
8.1.140.0000.00719.87
8.1.130.0000.00718.09
8.1.120.0070.00017.79
8.1.110.0040.00717.80
8.1.100.0000.00717.74
8.1.90.0000.00817.91
8.1.80.0000.00717.77
8.1.70.0060.00317.73
8.1.60.0000.00817.99
8.1.50.0030.00517.80
8.1.40.0040.00417.77
8.1.30.0050.00317.91
8.1.20.0040.00417.82
8.1.10.0050.00317.84
8.1.00.0080.00017.92
8.0.300.0070.00020.36
8.0.290.0000.00717.13
8.0.280.0040.00418.81
8.0.270.0000.00917.27
8.0.260.0000.00617.59
8.0.250.0000.00717.41
8.0.240.0070.00017.20
8.0.230.0030.00317.32
8.0.220.0040.00417.36
8.0.210.0000.00717.30
8.0.200.0000.00617.44
8.0.190.0030.00517.24
8.0.180.0000.00817.31
8.0.170.0000.00717.41
8.0.160.0050.00217.28
8.0.150.0030.00317.33
8.0.140.0070.00017.20
8.0.130.0030.00313.68
8.0.120.0030.00517.19
8.0.110.0060.00317.23
8.0.100.0050.00317.09
8.0.90.0040.00417.21
8.0.80.0060.00917.32
8.0.70.0030.00517.19
8.0.60.0000.00717.34
8.0.50.0030.00517.31
8.0.30.0110.01017.36
8.0.20.0140.00817.40
8.0.10.0050.00317.37
8.0.00.0140.01017.02
7.4.330.0070.00015.55
7.4.320.0080.00016.90
7.4.300.0000.00616.77
7.4.290.0000.00716.81
7.4.280.0030.00616.96
7.4.270.0000.01116.90
7.4.260.0000.00716.96
7.4.250.0040.00416.93
7.4.240.0050.00216.94
7.4.230.0070.00016.84
7.4.220.0090.00916.91
7.4.210.0120.00316.85
7.4.200.0000.00716.95
7.4.160.0070.00916.85
7.4.150.0150.00717.40
7.4.140.0050.01417.86
7.4.130.0110.00816.93
7.4.120.0090.00816.92
7.4.110.0100.00717.04
7.4.100.0030.01316.86
7.4.90.0070.01016.75
7.4.80.0120.00619.39
7.4.70.0050.01116.72
7.4.60.0110.01116.81
7.4.50.0060.00616.74
7.4.40.0030.01316.86
7.4.30.0100.00616.79
7.4.00.0030.01115.05
7.3.330.0050.00013.58
7.3.320.0000.00513.50
7.3.310.0000.00716.62
7.3.300.0070.00016.53
7.3.290.0060.01016.71
7.3.280.0090.00916.69
7.3.270.0070.01017.40
7.3.260.0100.01016.96
7.3.250.0110.00616.83
7.3.240.0160.00516.67
7.3.230.0070.01016.77
7.3.210.0090.00916.81
7.3.200.0070.01016.91
7.3.190.0100.01316.71
7.3.180.0100.01016.92
7.3.170.0070.01717.04
7.3.160.0100.01016.86
7.3.120.0070.01014.91
7.3.110.0030.01615.01
7.3.100.0030.00615.07
7.3.90.0030.00715.05
7.3.80.0080.00814.94
7.3.70.0080.00314.99
7.3.60.0060.00915.02
7.3.50.0060.00915.21
7.3.40.0040.01215.02
7.3.30.0120.00614.78
7.3.20.0060.01216.89
7.3.10.0050.00516.79
7.3.00.0110.00216.84
7.2.330.0100.00916.95
7.2.320.0130.01316.79
7.2.310.0140.01016.95
7.2.300.0180.00317.04
7.2.290.0130.00316.84
7.2.250.0040.01515.16
7.2.240.0160.00015.33
7.2.230.0070.01015.33
7.2.220.0060.00615.20
7.2.210.0030.01315.37
7.2.200.0060.00315.22
7.2.190.0030.00915.26
7.2.180.0100.00015.37
7.2.170.0070.00715.20
7.2.130.0030.00916.98
7.2.120.0060.00817.27
7.2.110.0000.00917.13
7.2.100.0060.00617.00
7.2.90.0130.00416.89
7.2.80.0060.00316.97
7.2.70.0030.00717.09
7.2.60.0050.01017.25
7.2.50.0090.00616.91
7.2.40.0030.01016.86
7.2.30.0000.01016.79
7.2.20.0080.00816.83
7.2.10.0110.00617.07
7.2.00.0090.00518.46
7.1.330.0030.01015.96
7.1.320.0070.00715.95
7.1.310.0080.00516.15
7.1.300.0000.01415.97
7.1.290.0120.00315.91
7.1.280.0140.00415.89
7.1.270.0070.01016.00
7.1.260.0070.00715.82
7.1.250.0040.00715.75
7.1.240.0060.01015.79
7.1.230.0000.01115.84
7.1.220.0090.00315.88
7.1.210.0060.00915.73
7.1.200.0080.00615.99
7.1.190.0030.01015.72
7.1.180.0070.01015.89
7.1.170.0080.00415.70
7.1.160.0070.00716.05
7.1.150.0000.01115.76
7.1.140.0050.00815.75
7.1.130.0030.00715.86
7.1.120.0030.01015.83
7.1.110.0030.00716.02
7.1.100.0090.00516.84
7.1.90.0040.00516.01
7.1.80.0100.00416.00
7.1.70.0320.00516.81
7.1.60.0270.00516.59
7.1.50.0250.01116.72
7.1.40.0370.00816.66
7.1.30.0330.00316.73
7.1.20.0440.01016.62
7.1.10.0300.00616.61
7.1.00.0300.01316.52
7.0.330.0000.01015.64
7.0.320.0060.00615.36
7.0.310.0060.00615.34
7.0.300.0080.00415.48
7.0.290.0080.00415.46
7.0.280.0080.00015.39
7.0.270.0070.00715.37
7.0.260.0030.00615.62
7.0.250.0030.00615.54
7.0.240.0030.00715.41
7.0.230.0030.00715.72
7.0.220.0060.00615.38
7.0.210.0000.01115.48
7.0.200.0350.00516.43
7.0.190.0310.00416.43
7.0.180.0350.00916.46
7.0.170.0290.00716.47
7.0.160.0410.00516.54
7.0.150.0290.00816.43
7.0.140.0270.00616.54
7.0.130.0420.00616.51
7.0.120.0380.00516.57
7.0.110.0320.00516.57
7.0.100.0340.00616.44
7.0.90.0480.00816.40
7.0.80.0400.00716.46
7.0.70.0370.00716.46
7.0.60.0350.01016.44
7.0.50.0350.00816.54
7.0.40.0100.00415.48
7.0.30.0060.00815.48
7.0.20.0080.00615.49
7.0.10.0050.00815.50
7.0.00.0100.00415.49
5.6.380.0060.00614.53
5.6.370.0040.00814.59
5.6.360.0030.01014.77
5.6.350.0060.00614.53
5.6.340.0030.00714.50
5.6.330.0030.00714.47
5.6.320.0000.01414.59
5.6.310.0040.00814.57
5.6.300.0080.02517.72
5.6.290.0100.02017.61
5.6.280.0160.01717.93
5.6.270.0100.02517.78
5.6.260.0060.02617.67
5.6.250.0150.01817.73
5.6.240.0040.02817.74
5.6.230.0070.02617.70
5.6.220.0160.02117.62
5.6.210.0090.02417.76
5.6.200.0070.02517.59
5.6.190.0040.03217.89
5.6.180.0100.03017.62
5.6.170.0080.02217.59
5.6.160.0020.03317.71
5.6.150.0030.02917.87
5.6.140.0110.01917.82
5.6.130.0090.02217.69
5.6.120.0080.02617.78
5.6.110.0050.03817.70
5.6.100.0020.03517.66
5.6.90.0010.03017.75
5.6.80.0040.02817.50
5.6.70.0070.02517.35
5.6.60.0070.02517.40
5.6.50.0150.02417.41
5.6.40.0080.02317.31
5.6.30.0110.03217.35
5.6.20.0060.03217.37
5.6.10.0080.02317.40
5.6.00.0040.02417.35

preferences:
24.14 ms | 401 KiB | 5 Q