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 "\n" . $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.0110.01116.75
8.3.50.0150.00722.23
8.3.40.0110.00419.04
8.3.30.0000.01419.27
8.3.20.0040.00420.42
8.3.10.0040.00423.86
8.3.00.0070.00317.88
8.2.180.0080.00816.88
8.2.170.0070.01322.96
8.2.160.0070.00720.60
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00022.46
8.2.110.0030.00622.48
8.2.100.0040.00818.03
8.2.90.0000.00819.42
8.2.80.0040.00418.38
8.2.70.0090.00317.75
8.2.60.0080.00018.17
8.2.50.0000.00918.07
8.2.40.0080.00018.59
8.2.30.0040.00418.41
8.2.20.0050.00217.96
8.2.10.0040.00418.26
8.2.00.0090.00017.95
8.1.280.0040.01125.92
8.1.270.0000.01022.62
8.1.260.0040.00426.35
8.1.250.0050.00528.09
8.1.240.0060.00323.97
8.1.230.0100.00019.38
8.1.220.0030.00517.80
8.1.210.0000.00818.77
8.1.200.0040.00417.60
8.1.190.0080.00017.93
8.1.180.0030.00618.10
8.1.170.0000.00818.73
8.1.160.0030.00622.40
8.1.150.0000.00718.84
8.1.140.0000.00717.70
8.1.130.0000.00718.02
8.1.120.0000.00717.76
8.1.110.0000.00817.74
8.1.100.0070.00017.75
8.1.90.0040.00417.78
8.1.80.0030.00317.61
8.1.70.0000.00717.60
8.1.60.0030.00617.90
8.1.50.0040.00417.84
8.1.40.0040.00417.75
8.1.30.0060.00317.79
8.1.20.0040.00417.81
8.1.10.0070.00017.88
8.1.00.0030.00617.82
8.0.300.0000.00718.77
8.0.290.0040.00417.39
8.0.280.0000.00718.84
8.0.270.0030.00317.49
8.0.260.0000.00717.49
8.0.250.0000.00717.11
8.0.240.0000.00817.13
8.0.230.0050.00217.25
8.0.220.0070.00017.10
8.0.210.0030.00617.07
8.0.200.0000.00817.25
8.0.190.0050.00217.25
8.0.180.0050.00217.05
8.0.170.0040.00417.07
8.0.160.0000.00817.09
8.0.150.0000.00717.05
8.0.140.0040.00417.14
8.0.130.0060.00013.62
8.0.120.0080.00016.97
8.0.110.0000.00716.97
8.0.100.0040.00417.09
8.0.90.0040.00417.16
8.0.80.0080.00817.16
8.0.70.0040.00417.13
8.0.60.0040.00417.09
8.0.50.0070.00017.26
8.0.30.0100.00917.49
8.0.20.0130.00717.40
8.0.10.0050.00317.23
8.0.00.0100.00817.24
7.4.330.0040.00415.00
7.4.320.0030.00516.93
7.4.300.0000.00616.80
7.4.290.0030.00316.84
7.4.280.0030.00316.86
7.4.270.0080.00016.87
7.4.260.0030.00316.86
7.4.250.0000.00916.88
7.4.240.0030.00516.70
7.4.230.0070.00017.01
7.4.220.0150.00316.80
7.4.210.0070.00816.95
7.4.200.0030.00316.68
7.4.190.0050.00216.89
7.4.160.0160.00016.76
7.4.150.0110.00617.40
7.4.140.0130.00517.86
7.4.130.0100.00616.73
7.4.120.0090.01216.69
7.4.110.0120.00916.79
7.4.100.0110.01116.72
7.4.90.0070.01016.78
7.4.80.0130.01019.39
7.4.70.0110.00716.77
7.4.60.0120.00616.72
7.4.50.0030.00616.71
7.4.40.0040.01122.77
7.4.30.0090.00616.71
7.4.00.0120.00615.05
7.3.330.0050.00013.35
7.3.320.0040.00413.21
7.3.310.0080.00016.38
7.3.300.0000.00716.57
7.3.290.0090.01016.51
7.3.280.0050.01216.56
7.3.270.0120.01317.40
7.3.260.0130.00316.57
7.3.250.0080.01016.64
7.3.240.0100.00716.66
7.3.230.0070.01316.97
7.3.210.0130.00616.45
7.3.200.0040.01419.39
7.3.190.0150.00916.73
7.3.180.0060.00916.85
7.3.170.0100.00616.88
7.3.160.0120.00316.80
7.3.120.0060.01114.92
7.2.330.0090.00916.74
7.2.320.0100.01317.00
7.2.310.0110.00616.97
7.2.300.0190.00316.97
7.2.290.0110.00517.08
7.2.00.0040.01119.81
7.1.100.0040.01118.04
7.1.70.0040.00417.16
7.1.60.0040.01419.33
7.1.50.0100.00734.70
7.1.00.0030.07722.56
7.0.200.0120.00016.99
7.0.140.0070.07022.03
7.0.60.0130.06020.04
7.0.50.0130.04018.01
7.0.40.0170.08320.11
7.0.30.0200.04320.37
7.0.20.0270.07720.29
7.0.10.0130.08020.32
7.0.00.0100.04720.29
5.6.210.0070.05320.71
5.6.200.0130.07718.27
5.6.190.0030.04720.59
5.6.180.0330.04720.57
5.6.170.0230.07720.64
5.6.160.0030.04320.59
5.6.150.0070.08318.26
5.6.140.0070.07318.31
5.6.130.0070.04718.26
5.6.120.0230.04721.17
5.6.110.0030.08721.12
5.6.100.0170.07721.25
5.6.90.0070.07021.18
5.6.80.0030.04020.58
5.6.70.3330.03720.63
5.5.350.0170.08020.52
5.5.340.0070.08018.11
5.5.330.0100.08320.35
5.5.320.0270.04020.39
5.5.310.0200.04320.34
5.5.300.0100.06018.05
5.5.290.0030.04018.14
5.5.280.0130.07720.99
5.5.270.0200.04020.88
5.5.260.0070.04021.07
5.5.250.0070.03720.86
5.5.240.0230.06720.39
5.4.450.0230.06319.56
5.4.440.0730.05319.58
5.4.430.0930.05019.67
5.4.420.0400.06719.41
5.4.410.0130.05019.55
5.4.400.0570.05719.47
5.4.390.0770.06319.09
5.4.380.0330.05718.95
5.4.370.0430.05018.90
5.4.360.0370.05018.86
5.4.350.0300.07018.83
5.4.340.0370.04718.77
5.4.320.0110.03412.61
5.4.310.0100.03412.61
5.4.300.0070.04112.61
5.4.290.0060.04512.61
5.4.280.0050.03512.51
5.4.270.0060.04212.51
5.4.260.0070.03712.51
5.4.250.0030.04112.50
5.4.240.0060.03712.50
5.4.230.0050.04012.50
5.4.220.0040.04012.50
5.4.210.0040.03612.50
5.4.200.0080.03812.50
5.4.190.0350.08812.50
5.4.180.0240.09412.49
5.4.170.0160.04212.50
5.4.160.0160.04212.50
5.4.150.0330.08812.50
5.4.140.0360.08612.18
5.4.130.0330.08912.17
5.4.120.0400.08512.13
5.4.110.0550.09512.12
5.4.100.0190.04012.12
5.4.90.0140.04512.12
5.4.80.0260.06612.12
5.4.70.0270.06612.12
5.4.60.0390.08212.12
5.4.50.0350.08712.12
5.4.40.0430.08412.11
5.4.30.0180.04812.11
5.4.20.0380.08312.11
5.4.10.0410.08012.11
5.4.00.0400.11511.59
5.3.290.0050.04712.88
5.3.280.0050.04212.80
5.3.270.0310.09812.81
5.3.260.0240.06212.81
5.3.250.0330.09312.82
5.3.240.0370.08812.81
5.3.230.0400.08412.80
5.3.220.0160.04312.77
5.3.210.0320.09412.77
5.3.200.0280.07712.77
5.3.190.0190.04812.77
5.3.180.0210.04112.77
5.3.170.0210.04212.77
5.3.160.0400.09112.77
5.3.150.0250.04312.77
5.3.140.0140.04912.76
5.3.130.0210.05312.75
5.3.120.0190.04512.76
5.3.110.0580.10212.75
5.3.100.0440.11112.24
5.3.90.0390.08112.23
5.3.80.0350.08812.22
5.3.70.0310.09112.22
5.3.60.0380.08712.20
5.3.50.0160.04912.16
5.3.40.0280.09712.16
5.3.30.0190.04612.12
5.3.20.0150.04811.89
5.3.10.0420.08311.86
5.3.00.0460.07911.84
5.2.170.0230.0339.35
5.2.160.0130.0369.34
5.2.150.0170.0429.35
5.2.140.0160.0389.35
5.2.130.0160.0349.31
5.2.120.0160.0389.30
5.2.110.0260.0879.31
5.2.100.0350.0739.30
5.2.90.0140.0339.30
5.2.80.0160.0369.29
5.2.70.0330.0789.29
5.2.60.0330.0759.26
5.2.50.0170.0359.22
5.2.40.0550.1179.20
5.2.30.0130.0349.17
5.2.20.0310.0779.16
5.2.10.0350.0729.09
5.2.00.0160.0298.95
5.1.60.0280.0458.23
5.1.50.0130.0288.23
5.1.40.0120.0278.21
5.1.30.0170.0328.57
5.1.20.0090.0348.59
5.1.10.0100.0338.31
5.1.00.0120.0318.31
5.0.50.0230.0726.80
5.0.40.0220.0756.66
5.0.30.0130.0326.48
5.0.20.0090.0236.45
5.0.10.0080.0236.43
5.0.00.0120.0346.42
4.4.90.0090.0164.78
4.4.80.0080.0174.76
4.4.70.0110.0144.75
4.4.60.0070.0224.76
4.4.50.0050.0204.77
4.4.40.0060.0304.71
4.4.30.0140.0434.76
4.4.20.0090.0184.85
4.4.10.0110.0174.85
4.4.00.0040.0314.76
4.3.110.0070.0174.67
4.3.100.0090.0154.67
4.3.90.0070.0184.63
4.3.80.0090.0254.58
4.3.70.0090.0164.63
4.3.60.0090.0164.63
4.3.50.0070.0184.63
4.3.40.0220.0724.54
4.3.30.0080.0163.30
4.3.20.0060.0173.29
4.3.10.0030.0193.25
4.3.00.0070.0237.80

preferences:
41.9 ms | 401 KiB | 5 Q