3v4l.org

run code in 300+ PHP versions simultaneously
<?php $root = new DOMDocument(); $root->loadXML('<article id=""></article>'); for($i=0;$i<=300;$i++){ $node = new DOMDocument(); $node->loadXML('<section id="'.$i.'"><h1>Überschrift</h1><h2>Überschrift2</h2><p>Content</p></section>'); $xpath = new DOMXPath($node); $query = '//h1'; $entries=$xpath->query($query); print_r($entries->nodeValue); $node = $root->importNode($node->documentElement, true); $root->documentElement->appendChild($node); } #print $root->saveXML();

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.0040.02517.50
8.3.50.0160.00617.12
8.3.40.0100.02719.46
8.3.30.0080.01919.31
8.3.20.0070.00721.01
8.3.10.0080.00422.60
8.3.00.0080.00421.45
8.2.180.0150.00619.23
8.2.170.0160.01922.96
8.2.160.0100.01322.95
8.2.150.0040.00824.18
8.2.140.0080.00424.66
8.2.130.0060.00623.13
8.2.120.0110.00026.35
8.2.110.0120.00323.26
8.2.100.0100.01018.53
8.2.90.0040.01219.82
8.2.80.0060.01318.25
8.2.70.0000.01318.25
8.2.60.0030.00918.68
8.2.50.0000.01418.68
8.2.40.0070.00723.01
8.2.30.0030.01021.75
8.2.20.0030.01018.78
8.2.10.0070.00718.94
8.2.00.0030.00918.93
8.1.280.0120.01225.92
8.1.270.0040.00724.82
8.1.260.0090.00326.35
8.1.250.0080.00428.09
8.1.240.0030.01023.41
8.1.230.0130.00318.38
8.1.220.0040.01118.54
8.1.210.0100.00318.77
8.1.200.0060.00918.23
8.1.190.0040.01118.22
8.1.180.0000.01318.41
8.1.170.0040.01119.28
8.1.160.0060.00619.78
8.1.150.0060.00919.70
8.1.140.0070.00720.34
8.1.130.0000.01219.78
8.1.120.0030.01018.35
8.1.110.0100.00318.12
8.1.100.0030.01318.20
8.1.90.0030.01018.12
8.1.80.0000.01318.13
8.1.70.0030.00918.21
8.1.60.0040.01118.23
8.1.50.0070.00718.31
8.1.40.0070.01018.25
8.1.30.0060.00618.52
8.1.20.0000.01418.48
8.1.10.0000.01318.46
8.1.00.0030.01218.14
8.0.300.0030.01318.77
8.0.290.0030.00917.63
8.0.280.0000.01219.17
8.0.270.0060.00617.98
8.0.260.0040.00817.67
8.0.250.0030.01017.61
8.0.240.0070.00717.80
8.0.230.0000.01417.84
8.0.220.0000.01217.75
8.0.210.0030.01117.77
8.0.200.0000.01217.76
8.0.190.0170.00317.66
8.0.180.0060.00917.59
8.0.170.0040.01117.83
8.0.160.0030.00917.65
8.0.150.0090.00317.78
8.0.140.0000.01317.64
8.0.130.0130.00014.03
8.0.120.0030.01017.66
8.0.110.0040.00917.51
8.0.100.0030.00917.78
8.0.90.0000.01317.78
8.0.80.0220.01517.73
8.0.70.0000.01717.65
8.0.60.0100.00317.61
8.0.50.0030.01017.41
8.0.30.0110.02017.85
8.0.20.0160.02417.74
8.0.10.0110.00317.79
8.0.00.0200.02017.42
7.4.330.0000.01115.77
7.4.320.0030.00917.48
7.4.300.0060.00617.37
7.4.290.0000.01317.40
7.4.280.0000.01317.40
7.4.270.0000.01317.14
7.4.260.0000.01014.15
7.4.250.0000.01317.34
7.4.240.0000.01417.44
7.4.230.0100.00317.38
7.4.220.0060.03317.34
7.4.210.0130.01917.34
7.4.200.0000.01217.43
7.4.160.0210.01517.35
7.4.150.0170.02317.43
7.4.140.0210.02717.86
7.4.130.0210.03417.25
7.4.120.0250.01817.30
7.4.110.0100.03317.29
7.4.100.0230.02017.31
7.4.90.0150.02617.27
7.4.80.0160.02219.39
7.4.70.0170.01717.23
7.4.60.0200.02017.26
7.4.50.0070.02217.23
7.4.40.0150.02017.39
7.4.30.0100.03917.16
7.4.00.0120.01215.63
7.3.330.0030.00614.04
7.3.320.0000.01014.10
7.3.310.0060.00917.04
7.3.300.0070.00717.03
7.3.290.0060.00617.02
7.3.280.0110.02417.17
7.3.270.0160.02317.40
7.3.260.0160.03717.20
7.3.250.0210.02917.11
7.3.240.0160.02017.29
7.3.230.0120.02417.28
7.3.210.0250.01117.27
7.3.200.0260.02317.28
7.3.190.0110.02517.17
7.3.180.0130.02517.14
7.3.170.0060.03917.14
7.3.160.0170.03017.33
7.2.330.0070.03017.54
7.2.320.0130.02317.45
7.2.310.0090.02717.26
7.2.300.0120.03717.40
7.2.290.0180.02717.23
7.2.60.0030.02117.36
7.2.00.0000.02919.89
7.1.200.0070.02516.21
7.1.100.0030.02018.68
7.1.70.0060.00917.89
7.1.60.0430.02734.07
7.1.50.0470.02333.68
7.1.40.0400.03033.37
7.1.30.0970.03033.46
7.1.20.0430.02333.41
7.1.10.0230.02715.31
7.1.00.0200.03015.39
7.0.200.0330.02315.66
7.0.190.0270.03715.32
7.0.180.0300.02015.09
7.0.170.0230.02715.09
7.0.160.0270.02715.05
7.0.150.0270.02714.99
7.0.140.0270.02715.27
7.0.130.0370.01715.18
7.0.120.0370.02015.33
7.0.110.0370.01715.09
7.0.100.0300.02315.08
7.0.90.0330.02315.12
7.0.80.0300.03015.11
7.0.70.0270.03015.14
7.0.60.0230.03015.04
7.0.50.0330.02315.01
7.0.40.0230.03015.25
7.0.30.0230.03315.34
7.0.20.0300.02315.11
7.0.10.0300.02315.28
7.0.00.0400.01315.32

preferences:
49.1 ms | 400 KiB | 5 Q