3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); //$xml->loadXML('<root><node/></root>'); $root = $xml->createElement("root"); $xml->appendChild($root); $xpath = new DOMXpath($xml); $el = $xml->createElement("testnode", "some val"); $root->appendChild($el); $el = $xml->createElement("testnode", "some val 2"); $root->appendChild($el); $xml->formatOutput = true; echo $xml->saveXML(); $entries = $xpath->query("/root/testnode"); echo "test xpath: " . $entries->length; foreach($entries as $entry) { echo '<br />'. $entry->nodeValue; }

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.0070.00716.75
8.3.50.0080.00822.23
8.3.40.0040.01118.95
8.3.30.0070.00719.45
8.3.20.0000.00720.59
8.3.10.0080.00023.93
8.3.00.0050.00521.02
8.2.180.0140.00016.88
8.2.170.0110.00422.96
8.2.160.0110.00420.68
8.2.150.0030.00524.18
8.2.140.0000.00924.66
8.2.130.0170.00326.16
8.2.120.0000.00822.69
8.2.110.0040.00422.32
8.2.100.0040.00818.22
8.2.90.0070.00019.55
8.2.80.0000.00918.41
8.2.70.0040.00417.88
8.2.60.0060.00617.68
8.2.50.0050.00318.07
8.2.40.0030.00618.41
8.2.30.0040.00418.31
8.2.20.0050.00318.08
8.2.10.0050.00317.94
8.2.00.0080.00017.98
8.1.280.0160.00325.92
8.1.270.0000.00822.30
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0090.00024.08
8.1.230.0110.00019.42
8.1.220.0030.00618.04
8.1.210.0060.00318.77
8.1.200.0000.00817.73
8.1.190.0000.00818.03
8.1.180.0000.00818.10
8.1.170.0000.00818.91
8.1.160.0040.00422.22
8.1.150.0030.00619.04
8.1.140.0050.00317.68
8.1.130.0070.00018.09
8.1.120.0040.00417.63
8.1.110.0000.00817.75
8.1.100.0110.00017.76
8.1.90.0040.00417.77
8.1.80.0000.00717.61
8.1.70.0000.00817.71
8.1.60.0040.00417.74
8.1.50.0050.00317.82
8.1.40.0040.00417.89
8.1.30.0040.00417.84
8.1.20.0000.00717.78
8.1.10.0040.00417.80
8.1.00.0080.00317.81
8.0.300.0070.00018.77
8.0.290.0050.00217.54
8.0.280.0030.00318.77
8.0.270.0000.00717.59
8.0.260.0000.00817.07
8.0.250.0060.00017.18
8.0.240.0050.00317.25
8.0.230.0000.00717.23
8.0.220.0030.00317.18
8.0.210.0000.00817.24
8.0.200.0080.00017.24
8.0.190.0000.00717.14
8.0.180.0050.00517.09
8.0.170.0040.00417.05
8.0.160.0070.00017.20
8.0.150.0000.00717.17
8.0.140.0000.00817.05
8.0.130.0030.00313.64
8.0.120.0000.00817.07
8.0.110.0000.00717.08
8.0.100.0000.00817.14
8.0.90.0040.00417.10
8.0.80.0060.00917.11
8.0.70.0040.00417.16
8.0.60.0080.00017.29
8.0.50.0000.00717.14
8.0.30.0110.00917.30
8.0.20.0120.00817.45
8.0.10.0040.00417.45
8.0.00.0100.00717.04
7.4.330.0020.00215.29
7.4.320.0030.00316.93
7.4.300.0000.00616.76
7.4.290.0000.00716.75
7.4.280.0050.00316.93
7.4.270.0070.00016.81
7.4.260.0000.00716.87
7.4.250.0000.00716.87
7.4.240.0040.00416.75
7.4.230.0070.00017.03
7.4.220.0120.01216.89
7.4.210.0040.01016.86
7.4.200.0030.00317.03
7.4.190.0000.00816.74
7.4.160.0030.01316.67
7.4.150.0150.00417.40
7.4.140.0080.01017.86
7.4.130.0120.00516.82
7.4.120.0090.00716.77
7.4.110.0030.01416.75
7.4.100.0060.01316.91
7.4.90.0030.01316.85
7.4.80.0070.01119.39
7.4.70.0060.01116.82
7.4.60.0110.00716.84
7.4.50.0030.00616.48
7.4.40.0090.00922.77
7.4.30.0130.00316.74
7.4.00.0070.00715.06
7.3.330.0000.00513.51
7.3.320.0000.00613.38
7.3.310.0030.00316.63
7.3.300.0000.00716.50
7.3.290.0060.00916.47
7.3.280.0090.01116.62
7.3.270.0090.01017.40
7.3.260.0100.00716.49
7.3.250.0040.01416.68
7.3.240.0080.00816.67
7.3.230.0090.01616.90
7.3.210.0120.01016.87
7.3.200.0160.00719.39
7.3.190.0060.01216.93
7.3.180.0140.00316.59
7.3.170.0090.00916.84
7.3.160.0100.00716.55
7.3.120.0140.00314.85
7.2.330.0110.00717.22
7.2.320.0090.00917.05
7.2.310.0030.01416.98
7.2.300.0070.01017.03
7.2.290.0030.01916.83
7.2.00.0030.00919.48
7.1.100.0030.01418.60
7.1.70.0030.00517.37
7.1.60.0110.01419.29
7.1.50.0070.01317.22
7.1.00.0030.07722.60
7.0.200.0070.00517.09
7.0.140.0130.06322.06
7.0.60.0070.08320.11
7.0.50.0130.04018.02
7.0.40.0100.09020.23
7.0.30.0330.07320.32
7.0.20.0400.06320.27
7.0.10.0270.05320.46
7.0.00.0130.05720.29
5.6.280.0030.07020.98
5.6.210.0170.06320.77
5.6.200.0030.05318.37
5.6.190.0030.04720.61
5.6.180.0030.07320.59
5.6.170.0270.07320.55
5.6.160.0100.04020.64
5.6.150.0030.06018.36
5.6.140.0000.04318.36
5.6.130.0100.08318.26
5.6.120.0100.08321.21
5.6.110.0170.07321.12
5.6.100.0230.06721.15
5.6.90.0130.06021.14
5.6.80.0100.06720.55
5.5.350.0070.07720.48
5.5.340.0070.04318.16
5.5.330.0100.07020.27
5.5.320.0030.07720.31
5.5.310.0200.04020.38
5.5.300.0070.05318.18
5.5.290.0000.05018.15
5.5.280.0170.07320.89
5.5.270.0030.07720.97
5.5.260.0130.07720.92
5.5.250.0070.07720.73
5.5.240.0030.04020.28
5.4.450.0230.07319.56
5.4.440.0200.04019.60
5.4.430.0130.04319.53
5.4.420.0100.04019.59
5.4.410.0100.04019.49
5.4.400.0130.03719.29
5.4.390.0170.03319.29
5.4.380.0100.04319.01
5.4.370.0170.04019.01
5.4.360.0130.03719.29
5.4.350.0100.03719.36
5.4.340.0200.03319.30
5.4.320.0170.03019.01
5.4.310.0170.03719.05
5.4.300.0170.03319.23
5.4.290.0130.03319.00
5.4.280.0130.03319.13
5.4.270.0170.04319.39
5.4.260.0200.03019.30
5.4.250.0170.03019.21
5.4.240.0100.04019.23
5.4.230.0200.02719.02
5.4.220.0130.04319.26
5.4.210.0130.08019.12
5.4.200.0100.06019.05
5.4.190.0270.07019.29
5.4.180.0130.04319.23
5.4.170.0100.03719.00
5.4.160.0100.04318.99
5.4.150.0230.07319.11
5.4.140.0130.07016.63
5.4.130.0070.04016.45
5.4.120.0070.06716.45
5.4.110.0200.05716.41
5.4.100.0170.07016.41
5.4.90.0270.03716.45
5.4.80.0200.06316.63
5.4.70.0270.05716.67
5.4.60.0200.06716.40
5.4.50.0270.05016.61
5.4.40.0170.04316.62
5.4.30.0230.06716.61
5.4.20.0170.07716.59
5.4.10.0230.06716.47
5.4.00.0170.07016.19
5.3.290.0100.03714.86
5.3.280.0130.06014.60
5.3.270.0170.03014.70
5.3.260.0130.03714.77
5.3.250.0270.04714.70
5.3.240.0170.03714.84
5.3.230.0170.06714.73
5.3.220.0230.03714.75
5.3.210.0170.05714.61
5.3.200.0200.07714.57
5.3.190.0170.08014.56
5.3.180.0200.06314.65
5.3.170.0300.06014.73
5.3.160.0130.04714.66
5.3.150.0130.06314.75
5.3.140.0270.06314.60
5.3.130.0300.06714.78
5.3.120.0130.06014.64
5.3.110.0170.07014.64
5.3.100.0270.06314.05
5.3.90.0300.06014.17
5.3.80.0200.06014.06
5.3.70.0230.06314.02
5.3.60.0330.05014.09
5.3.50.0130.08013.93
5.3.40.0200.07013.94
5.3.30.0300.05314.01
5.3.20.0170.04013.79
5.3.10.0300.04013.83
5.3.00.0200.07013.63
5.2.170.0130.05011.99
5.2.160.0130.03711.99
5.2.150.0100.03311.99
5.2.140.0100.04011.99
5.2.130.0130.03311.99
5.2.120.0100.03711.99
5.2.110.0230.04311.99
5.2.100.0130.06711.99
5.2.90.0170.05711.99
5.2.80.0170.06311.99
5.2.70.0070.04711.99
5.2.60.0170.05011.99
5.2.50.0200.05011.99
5.2.40.0070.04011.99
5.2.30.0100.03011.99
5.2.20.0070.03011.99
5.2.10.0200.03711.99
5.2.00.0130.04011.99
5.1.60.0130.04011.99
5.1.50.0100.02311.99
5.1.40.0100.02711.99
5.1.30.0130.04711.99
5.1.20.0230.05011.99
5.1.10.0130.03011.99
5.1.00.0130.05711.99
5.0.50.0100.03711.99
5.0.40.0130.04011.99
5.0.30.0100.03011.99
5.0.20.0000.03011.99
5.0.10.0070.02311.99
5.0.00.0070.03311.99
4.4.90.0100.03011.99
4.4.80.0100.02311.99
4.4.70.0070.02011.99
4.4.60.0070.01711.99
4.4.50.0030.03011.99
4.4.40.0070.03011.99
4.4.30.0070.01711.99
4.4.20.0100.02711.99
4.4.10.0130.02711.99
4.4.00.0130.04311.99
4.3.110.0030.02311.99
4.3.100.0030.02011.99
4.3.90.0100.01711.99
4.3.80.0070.03011.99
4.3.70.0070.03011.99
4.3.60.0070.02011.99
4.3.50.0030.03711.99
4.3.40.0070.03311.99
4.3.30.0000.02011.99
4.3.20.0030.02711.99
4.3.10.0030.02011.99
4.3.00.0030.03311.99

preferences:
42.36 ms | 401 KiB | 5 Q