3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $f = $doc->createDocumentFragment(); $f->appendXML('<h1>Foo</h1><h2>Bar</h2><p>lorem ipsum</p>'); $doc->documentElement->appendChild($f); $nodes = $f->getElementsByTagName('*'); echo $nodes->item(0)->tagName . ' -> ' . $nodes->item(0)->nodeValue . '<br/>'; foreach ($nodes as $node) { echo $node->tagName . ' -> ' . $node->nodeValue . '<br/>'; }

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.0120.00316.75
8.3.50.0130.00521.98
8.3.40.0040.01119.05
8.3.30.0040.01119.09
8.3.20.0000.00820.45
8.3.10.0060.00323.73
8.3.00.0080.00019.76
8.2.180.0110.00718.91
8.2.170.0150.00322.96
8.2.160.0070.00722.13
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0000.01017.88
8.2.120.0040.00426.35
8.2.110.0090.00020.78
8.2.100.0040.00818.05
8.2.90.0000.00819.25
8.2.80.0040.00417.97
8.2.70.0030.00517.88
8.2.60.0080.00018.03
8.2.50.0000.00818.07
8.2.40.0050.00319.46
8.2.30.0050.00320.89
8.2.20.0030.00617.99
8.2.10.0040.00418.29
8.2.00.0070.00018.19
8.1.280.0060.00925.92
8.1.270.0000.01122.39
8.1.260.0040.00428.09
8.1.250.0070.00728.09
8.1.240.0090.00024.28
8.1.230.0080.00417.90
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0060.00317.61
8.1.190.0030.00617.61
8.1.180.0040.00418.10
8.1.170.0060.00319.00
8.1.160.0040.00422.24
8.1.150.0000.00818.97
8.1.140.0000.00819.61
8.1.130.0070.00017.79
8.1.120.0000.00817.65
8.1.110.0080.00017.66
8.1.100.0030.00517.66
8.1.90.0070.00017.53
8.1.80.0000.00817.52
8.1.70.0030.00317.48
8.1.60.0060.00317.73
8.1.50.0030.00517.80
8.1.40.0000.00817.67
8.1.30.0000.00817.80
8.1.20.0000.00717.86
8.1.10.0050.00317.72
8.1.00.0030.00517.76
8.0.300.0050.00218.77
8.0.290.0000.00717.00
8.0.280.0030.00318.44
8.0.270.0050.00317.30
8.0.260.0000.00617.35
8.0.250.0040.00417.26
8.0.240.0000.00717.08
8.0.230.0000.00717.07
8.0.220.0000.00716.99
8.0.210.0040.00416.97
8.0.200.0000.00717.11
8.0.190.0080.00017.25
8.0.180.0050.00317.11
8.0.170.0040.00417.04
8.0.160.0080.00017.17
8.0.150.0040.00416.93
8.0.140.0110.00016.96
8.0.130.0070.00013.50
8.0.120.0080.00017.03
8.0.110.0000.00717.00
8.0.100.0030.00516.96
8.0.90.0000.00716.96
8.0.80.0030.01817.13
8.0.70.0040.00417.14
8.0.60.0040.00417.03
8.0.50.0030.00516.90
8.0.30.0160.00317.34
8.0.20.0100.00917.40
8.0.10.0000.00817.04
8.0.00.0150.00216.85
7.4.330.0000.00616.89
7.4.320.0000.00616.74
7.4.300.0030.00316.83
7.4.290.0030.00316.74
7.4.280.0000.00816.82
7.4.270.0000.00716.68
7.4.260.0030.00316.80
7.4.250.0000.00816.79
7.4.240.0030.00316.69
7.4.230.0030.00316.63
7.4.220.0100.01016.80
7.4.210.0070.01516.71
7.4.200.0000.00716.82
7.4.160.0110.00416.78
7.4.150.0110.00817.40
7.4.140.0120.01117.86
7.4.130.0090.01316.79
7.4.120.0150.00216.71
7.4.110.0060.01216.91
7.4.100.0110.00716.80
7.4.90.0150.00916.64
7.4.80.0110.00719.39
7.4.70.0150.00616.79
7.4.60.0130.00316.63
7.4.50.0040.01416.55
7.4.40.0100.01316.50
7.4.30.0070.01416.74
7.4.00.0030.01015.31
7.3.330.0000.00713.23
7.3.320.0030.00313.34
7.3.310.0040.00416.34
7.3.300.0030.00316.47
7.3.290.0070.00716.46
7.3.280.0080.00716.47
7.3.270.0100.01417.40
7.3.260.0090.01316.43
7.3.240.0080.00916.45
7.3.230.0120.00616.62
7.3.210.0140.00716.59
7.3.200.0030.01516.80
7.3.190.0030.01416.75
7.3.180.0090.00916.52
7.3.170.0140.00316.61
7.3.160.0070.01016.77
7.3.120.0130.00314.88
7.3.110.0080.01014.69
7.3.100.0130.00614.61
7.3.90.0060.00914.88
7.3.80.0070.00715.01
7.3.70.0030.01214.87
7.3.60.0000.01314.89
7.3.50.0060.00914.91
7.3.40.0100.00614.85
7.3.30.0030.00814.55
7.3.20.0070.00716.77
7.3.10.0000.01316.78
7.3.00.0080.00316.59
7.2.330.0120.00916.86
7.2.320.0100.00716.87
7.2.310.0070.01016.78
7.2.300.0130.01016.76
7.2.290.0120.00916.44
7.2.250.0030.01414.91
7.2.240.0040.01515.30
7.2.230.0090.00615.05
7.2.220.0070.01014.96
7.2.210.0040.01115.10
7.2.200.0030.01315.15
7.2.190.0080.00814.98
7.2.180.0000.01615.00
7.2.170.0090.00614.96
7.2.60.0090.00616.91
7.2.00.0000.01418.88
7.1.330.0030.01215.95
7.1.320.0000.01515.58
7.1.310.0030.01415.64
7.1.300.0000.01215.55
7.1.290.0030.01015.84
7.1.280.0090.00315.61
7.1.270.0110.00015.63
7.1.260.0070.01015.97
7.1.200.0070.00015.56
7.1.100.0030.00818.20
7.1.70.0030.01316.97
7.1.60.0060.01019.48
7.1.50.0190.00317.02
7.1.00.0030.07722.51
7.0.200.0370.00714.93
7.0.60.0130.07719.93
7.0.50.0070.08017.91
7.0.40.0100.04720.23
7.0.30.0300.07020.30
7.0.20.0330.06320.30
7.0.10.0070.08020.13
7.0.00.0100.06320.34
5.6.280.0070.06021.05
5.6.210.0070.04720.60
5.6.200.0030.04718.29
5.6.190.0070.04720.77
5.6.180.0330.05020.58
5.6.170.0330.07020.57
5.6.160.0070.07720.46
5.6.150.0130.03018.22
5.6.140.0100.05318.29
5.6.130.0000.08018.28
5.6.120.0030.04021.03
5.6.110.0100.08321.18
5.6.100.0100.08321.02
5.6.90.0270.07020.96
5.6.80.0130.07320.39
5.5.350.4200.04020.48
5.5.340.0100.07718.01
5.5.330.0130.06320.26
5.5.320.0400.06020.30
5.5.310.0230.06020.36
5.5.300.0100.08018.09
5.5.290.0070.05718.04
5.5.280.0070.04321.02
5.5.270.0130.07020.71
5.5.260.0070.04320.77
5.5.250.0030.05720.83
5.5.240.0230.07020.23

preferences:
57.14 ms | 401 KiB | 5 Q