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[1]"); echo "test xpath: " . $entries->length; foreach($entries as $entry) { echo $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.0060.01016.75
8.3.50.0140.00917.57
8.3.40.0070.01119.17
8.3.30.0120.00319.05
8.3.20.0030.00519.10
8.3.10.0080.00018.97
8.3.00.0030.00619.50
8.2.180.0130.00316.63
8.2.170.0140.00322.96
8.2.160.0040.01219.38
8.2.150.0030.00624.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0050.00221.36
8.2.110.0070.00322.45
8.2.100.0040.00818.09
8.2.90.0050.00318.00
8.2.80.0050.00319.16
8.2.70.0090.00017.75
8.2.60.0060.00318.04
8.2.50.0030.00518.07
8.2.40.0030.00619.73
8.2.30.0000.00917.89
8.2.20.0060.00617.83
8.2.10.0000.00718.00
8.2.00.0040.00717.86
8.1.280.0200.00025.92
8.1.270.0040.00423.99
8.1.260.0070.00726.35
8.1.250.0040.00428.09
8.1.240.0080.00422.47
8.1.230.0130.00317.79
8.1.220.0080.00017.91
8.1.210.0040.00418.77
8.1.200.0060.00317.50
8.1.190.0030.00617.60
8.1.180.0030.00618.10
8.1.170.0060.00319.08
8.1.160.0050.00219.32
8.1.150.0000.00718.84
8.1.140.0040.00417.66
8.1.130.0090.00019.56
8.1.120.0080.00017.75
8.1.110.0050.00317.70
8.1.100.0040.00417.64
8.1.90.0040.00417.64
8.1.80.0000.00817.55
8.1.70.0070.00017.68
8.1.60.0080.00017.98
8.1.50.0000.00817.60
8.1.40.0000.00917.74
8.1.30.0060.00317.98
8.1.20.0040.00417.77
8.1.10.0040.00417.96
8.1.00.0080.00017.86
8.0.300.0030.00718.77
8.0.290.0000.00817.00
8.0.280.0000.00718.84
8.0.270.0040.00417.49
8.0.260.0000.00717.01
8.0.250.0040.00417.26
8.0.240.0000.00717.13
8.0.230.0000.00717.20
8.0.220.0040.00417.14
8.0.210.0000.00717.07
8.0.200.0030.00317.22
8.0.190.0000.00817.23
8.0.180.0040.00417.13
8.0.170.0040.00417.16
8.0.160.0040.00417.02
8.0.150.0080.00017.02
8.0.140.0000.00717.00
8.0.130.0060.00013.52
8.0.120.0000.00917.20
8.0.110.0030.00317.07
8.0.100.0040.00417.11
8.0.90.0000.00717.06
8.0.80.0120.00317.18
8.0.70.0040.00417.02
8.0.60.0050.00517.25
8.0.50.0040.00417.13
8.0.30.0130.00717.29
8.0.20.0030.01517.47
8.0.10.0000.00717.45
8.0.00.0080.00917.16
7.4.330.0000.00513.29
7.4.320.0030.00316.84
7.4.300.0060.00016.77
7.4.290.0080.00016.83
7.4.280.0000.00816.79
7.4.270.0070.00016.78
7.4.260.0040.00413.54
7.4.250.0000.00816.84
7.4.240.0030.00316.79
7.4.230.0030.00616.75
7.4.220.0130.00316.90
7.4.210.0130.00316.75
7.4.200.0000.00816.99
7.4.190.0000.00816.81
7.4.160.0100.00616.70
7.4.150.0110.00716.77
7.4.140.0130.00416.57
7.4.130.0060.01116.73
7.4.120.0170.00716.80
7.4.110.0160.00816.65
7.4.100.0150.00316.70
7.4.90.0120.00616.59
7.4.80.0110.01119.39
7.4.70.0070.01016.47
7.4.60.0110.00716.74
7.4.50.0060.00016.85
7.4.40.0080.00616.59
7.4.30.0140.00316.74
7.4.00.0110.00414.96
7.3.330.0080.00013.47
7.3.320.0050.00013.44
7.3.310.0030.00316.48
7.3.300.0030.00316.52
7.3.290.0100.00316.58
7.3.280.0100.00816.55
7.3.270.0070.01016.56
7.3.260.0160.00416.53
7.3.250.0090.01016.67
7.3.240.0060.01016.74
7.3.230.0090.01516.69
7.3.210.0100.00716.74
7.3.200.0030.01416.63
7.3.190.0170.00016.61
7.3.180.0120.00316.87
7.3.170.0060.01016.57
7.3.160.0100.00716.83
7.3.120.0070.01114.77
7.3.110.0090.00914.67
7.3.100.0030.00915.34
7.3.90.0090.00614.92
7.3.80.0030.01015.02
7.3.70.0030.00815.09
7.3.60.0070.00714.90
7.3.50.0100.00014.71
7.3.40.0030.00714.91
7.3.30.0080.00414.74
7.3.20.0030.01016.74
7.3.10.0030.01016.91
7.3.00.0090.00316.98
7.2.330.0100.01016.85
7.2.320.0120.00416.71
7.2.310.0190.00316.72
7.2.300.0060.01216.86
7.2.290.0070.01017.02
7.2.240.0030.01615.28
7.2.230.0070.00715.28
7.2.220.0110.00015.22
7.2.210.0080.00615.12
7.2.200.0000.01215.19
7.2.190.0040.01115.16
7.2.180.0080.00315.14
7.2.170.0000.01515.35
7.2.160.0030.01015.29
7.2.150.0000.01117.26
7.2.140.0080.00817.21
7.2.130.0070.00717.21
7.2.120.0040.01116.87
7.2.110.0030.01017.13
7.2.100.0000.01317.03
7.2.90.0070.00717.04
7.2.80.0030.00817.03
7.2.70.0060.00617.13
7.2.60.0000.01017.21
7.2.50.0070.01016.88
7.2.40.0000.01517.24
7.2.30.0000.01717.09
7.2.20.0060.00617.24
7.2.10.0030.01017.13
7.2.00.0030.01118.14
7.1.330.0080.00615.94
7.1.320.0030.00915.75
7.1.310.0030.01315.71
7.1.300.0040.00815.75
7.1.290.0060.00615.89
7.1.280.0060.00616.01
7.1.270.0060.00315.77
7.1.260.0080.00015.93
7.1.250.0070.00715.95
7.1.100.0000.01018.33
7.1.70.0040.00417.39
7.1.60.0180.00719.30
7.1.50.0360.00434.62
7.1.00.0070.06322.61
7.0.200.0070.00316.86
7.0.140.0130.06722.17
7.0.120.0000.07722.19
7.0.60.0270.03020.05
7.0.50.0070.03718.08
7.0.40.0030.04320.41
7.0.30.0170.08720.47
7.0.20.0170.05720.13
7.0.10.0100.05720.30
7.0.00.0130.07320.22
5.6.280.0130.06321.03
5.6.210.0170.07320.78
5.6.200.0100.05018.36
5.6.190.0100.07320.53
5.6.180.3500.03320.54
5.6.170.0300.05720.71
5.6.160.0030.04020.69
5.6.150.0100.07718.38
5.6.140.0100.07718.25
5.6.130.0130.06718.36
5.6.120.0130.08321.07
5.6.110.0130.05021.22
5.6.100.0070.04321.15
5.6.90.0100.08321.14
5.6.80.0070.06720.52
5.5.350.0200.07320.44
5.5.340.0070.06718.13
5.5.330.0070.05720.54
5.5.320.0230.04320.33
5.5.310.0230.04720.47
5.5.300.0000.05018.12
5.5.290.0100.06318.16
5.5.280.0130.08020.89
5.5.270.0030.09320.86
5.5.260.0030.08721.02
5.5.250.0170.07320.84
5.5.240.0070.03020.27
5.4.450.0400.04322.21
5.4.440.0170.04722.21
5.4.430.0600.03322.18
5.4.420.0270.05722.18
5.4.410.0570.05022.18
5.4.400.0330.04022.18
5.4.390.0230.03722.18
5.4.380.0330.03722.18
5.4.370.0500.03722.18
5.4.360.0100.04322.18
5.4.350.0130.02722.18
5.4.340.0370.04322.18
5.4.320.0430.03722.18
5.4.310.0500.05022.18
5.4.300.0700.03022.18
5.4.290.0370.03022.18
5.4.280.0330.03722.18
5.4.270.0270.04322.18
5.4.260.0130.03022.18
5.4.250.0130.03722.18
5.4.240.0200.04022.18
5.4.230.0500.03722.18
5.4.220.0570.04022.18
5.4.210.0400.04722.18
5.4.200.0630.04322.18
5.4.190.0600.05022.18
5.4.180.0400.04022.18
5.4.170.0530.02722.18
5.4.160.0200.03722.18
5.4.150.0430.05322.18
5.4.140.0600.03022.18
5.4.130.0800.03722.18
5.4.120.0530.04022.18
5.4.110.0530.04022.18
5.4.100.0470.04022.18
5.4.90.0470.03322.18
5.4.80.0630.03722.18
5.4.70.0400.04722.18
5.4.60.0200.03022.18
5.4.50.0100.04722.18
5.4.40.0030.03722.18
5.4.30.0170.03322.18
5.4.20.0130.02322.16
5.4.10.0300.02722.09
5.4.00.0670.03322.08
5.3.290.0300.05022.18
5.3.280.0630.03722.18
5.3.270.0170.04022.18
5.3.260.0630.04022.18
5.3.250.0170.04722.18
5.3.240.0500.03322.18
5.3.230.0330.05322.18
5.3.220.0470.03022.18
5.3.210.0770.03322.18
5.3.200.0200.04722.18
5.3.190.0530.03722.18
5.3.180.0670.04022.18
5.3.170.0470.05022.18
5.3.160.0830.03322.18
5.3.150.0100.03022.18
5.3.140.0070.04022.18
5.3.130.0070.04022.18
5.3.120.0130.02722.18
5.3.110.0470.04022.16
5.3.100.0670.04022.02
5.3.90.0330.05022.02
5.3.80.0430.04322.02
5.3.70.0400.03722.02
5.3.60.0200.05322.02
5.3.50.0100.04022.02
5.3.40.0100.03722.02
5.3.30.0230.03322.02
5.3.20.0100.02722.02
5.3.10.0070.03722.02
5.3.00.0070.04322.02
5.2.170.0070.03022.02
5.2.160.0230.03022.02
5.2.150.0070.02322.02
5.2.140.0070.03322.02
5.2.130.0070.05022.02
5.2.120.0030.04022.02
5.2.110.0100.02322.02
5.2.100.0300.02722.02
5.2.90.0200.02722.02
5.2.80.0200.03322.02
5.2.70.0370.03322.02
5.2.60.0370.04022.02
5.2.50.0100.03322.02
5.2.40.0300.03722.02
5.2.30.0430.02722.02
5.2.20.0500.02322.02
5.2.10.0200.03322.02
5.2.00.0200.03022.02
5.1.60.0300.02022.02
5.1.50.0430.02722.02
5.1.40.0270.03022.02
5.1.30.0070.02322.02
5.1.20.0030.03022.02
5.1.10.0130.02722.02
5.1.00.0100.04022.02
5.0.50.0000.02722.02
5.0.40.0070.05022.02
5.0.30.0200.03722.02
5.0.20.0070.01722.02
5.0.10.0070.02322.02
5.0.00.0330.03022.02
4.4.90.0000.01722.02
4.4.80.0030.01722.02
4.4.70.0000.02322.02
4.4.60.0100.01322.02
4.4.50.0100.01722.02
4.4.40.0130.02721.98
4.4.30.0230.01722.02
4.4.20.0000.01722.02
4.4.10.0070.01322.02
4.4.00.0030.02722.02
4.3.110.0030.01722.02
4.3.100.0030.02722.02
4.3.90.0030.01722.02
4.3.80.0130.02722.02
4.3.70.0200.01722.02
4.3.60.0030.02022.02
4.3.50.0130.01722.02
4.3.40.0030.02722.02
4.3.30.0000.02322.02
4.3.20.0030.02722.02
4.3.10.0030.02322.02
4.3.00.0000.01322.02

preferences:
51.84 ms | 401 KiB | 5 Q