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->importNode($f); $nodes->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.0140.00418.56
8.3.50.0170.00222.16
8.3.40.0040.01118.92
8.3.30.0120.00318.96
8.3.20.0000.00820.52
8.3.10.0050.00323.82
8.3.00.0080.00019.63
8.2.180.0000.01517.13
8.2.170.0110.00722.96
8.2.160.0110.00422.23
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0090.00017.59
8.2.120.0080.00026.35
8.2.110.0060.00321.19
8.2.100.0000.01217.97
8.2.90.0030.00519.21
8.2.80.0000.00817.97
8.2.70.0050.00317.73
8.2.60.0000.00818.16
8.2.50.0040.00418.07
8.2.40.0080.00019.53
8.2.30.0000.00720.82
8.2.20.0020.00517.92
8.2.10.0000.00718.15
8.2.00.0000.00818.25
8.1.280.0120.00425.92
8.1.270.0040.00422.44
8.1.260.0040.00428.09
8.1.250.0150.00028.09
8.1.240.0060.00322.46
8.1.230.0030.00921.19
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0030.00617.60
8.1.190.0080.00017.60
8.1.180.0030.00618.10
8.1.170.0070.00018.98
8.1.160.0040.00422.30
8.1.150.0040.00419.06
8.1.140.0000.00819.61
8.1.130.0000.00717.89
8.1.120.0020.00517.55
8.1.110.0050.00217.61
8.1.100.0070.00017.57
8.1.90.0000.00717.52
8.1.80.0030.00517.53
8.1.70.0030.00317.65
8.1.60.0050.00317.74
8.1.50.0080.00017.77
8.1.40.0030.00517.73
8.1.30.0040.00417.86
8.1.20.0040.00417.78
8.1.10.0030.00517.73
8.1.00.0060.00317.72
8.0.300.0080.00018.77
8.0.290.0000.00716.88
8.0.280.0040.00418.51
8.0.270.0030.00317.36
8.0.260.0030.00317.44
8.0.250.0030.00617.14
8.0.240.0030.00317.14
8.0.230.0040.00417.14
8.0.220.0000.00817.03
8.0.210.0070.00017.09
8.0.200.0030.00317.17
8.0.190.0040.00417.19
8.0.180.0070.00017.07
8.0.170.0040.00417.10
8.0.160.0030.00317.09
8.0.150.0000.00717.01
8.0.140.0030.00717.02
8.0.130.0030.00313.43
8.0.120.0050.00317.09
8.0.110.0000.00716.93
8.0.100.0050.00316.98
8.0.90.0040.00417.13
8.0.80.0080.00817.15
8.0.70.0040.00417.13
8.0.60.0040.00417.14
8.0.50.0000.00717.11
8.0.30.0100.00817.29
8.0.20.0090.00917.40
8.0.10.0030.00517.05
8.0.00.0070.01016.97
7.4.330.0030.00317.00
7.4.320.0070.00016.76
7.4.300.0030.00316.72
7.4.290.0000.00716.81
7.4.280.0080.00016.77
7.4.270.0070.00016.75
7.4.260.0030.00616.73
7.4.250.0060.00316.80
7.4.240.0060.00216.61
7.4.230.0030.00516.58
7.4.220.0030.01616.93
7.4.210.0110.00716.84
7.4.200.0050.00316.78
7.4.160.0040.01116.73
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0150.00916.74
7.4.120.0120.00916.71
7.4.110.0120.01016.51
7.4.100.0060.01216.76
7.4.90.0200.00316.78
7.4.80.0060.01819.39
7.4.70.0110.00616.72
7.4.60.0120.00416.77
7.4.50.0060.00916.65
7.4.40.0070.01016.65
7.4.30.0130.00416.68
7.4.00.0030.01415.13
7.3.330.0000.00613.23
7.3.320.0000.00613.31
7.3.310.0000.00716.58
7.3.300.0050.00216.47
7.3.290.0070.00916.49
7.3.280.0080.01016.48
7.3.270.0030.01517.40
7.3.260.0070.01016.49
7.3.240.0030.01416.79
7.3.230.0090.00916.64
7.3.210.0110.00616.43
7.3.200.0130.00316.49
7.3.190.0110.00916.44
7.3.180.0100.00716.79
7.3.170.0080.01216.43
7.3.160.0100.01016.79
7.2.330.0080.01216.79
7.2.320.0100.00616.48
7.2.310.0070.01016.84
7.2.300.0110.00616.83
7.2.290.0140.01116.84
7.2.60.0080.00816.84
7.2.00.0000.01719.36
7.1.200.0070.00415.65
7.1.100.0070.00717.95
7.1.70.0000.00717.11
7.1.60.0030.01319.48
7.1.50.0090.01516.80
7.1.00.0070.07322.54
7.0.200.0260.00614.75
7.0.60.0100.05020.07
7.0.50.0030.07017.93
7.0.40.0100.08320.47
7.0.30.0170.05720.13
7.0.20.0330.05320.13
7.0.10.0070.04020.30
7.0.00.0100.08320.31
5.6.280.0070.07321.05
5.6.210.0030.04320.56
5.6.200.0070.07018.26
5.6.190.0100.08720.47
5.6.180.0300.04020.56
5.6.170.0270.05020.48
5.6.160.0000.05020.77
5.6.150.0070.03718.29
5.6.140.0000.04318.21
5.6.130.0170.04718.25
5.6.120.0070.04021.09
5.6.110.0130.07321.11
5.6.100.0070.08321.16
5.6.90.0000.08321.02
5.6.80.0070.05020.41
5.5.350.3630.04020.54
5.5.340.0030.04018.09
5.5.330.0200.03720.62
5.5.320.0470.07020.38
5.5.310.0200.04020.57
5.5.300.0270.03718.02
5.5.290.0070.03718.08
5.5.280.0000.04320.87
5.5.270.0130.04321.07
5.5.260.0130.07320.74
5.5.250.0070.05720.79
5.5.240.0170.08020.14

preferences:
46.51 ms | 401 KiB | 5 Q