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->item0->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.0130.01317.25
8.3.50.0140.01017.10
8.3.40.0220.00319.29
8.3.30.0120.01219.35
8.3.20.0090.00321.04
8.3.10.0060.00622.40
8.3.00.0030.00821.57
8.2.180.0170.00319.29
8.2.170.0130.02022.96
8.2.160.0090.01223.00
8.2.150.0070.00324.18
8.2.140.0030.00724.66
8.2.130.0000.01122.92
8.2.120.0030.00726.35
8.2.110.0080.00421.18
8.2.100.0060.01018.53
8.2.90.0040.00819.80
8.2.80.0070.01018.52
8.2.70.0040.00818.13
8.2.60.0030.00818.68
8.2.50.0040.00818.79
8.2.40.0040.00722.94
8.2.30.0030.00921.79
8.2.20.0000.01318.82
8.2.10.0000.01318.80
8.2.00.0040.00718.98
8.1.280.0040.01825.92
8.1.270.0100.01424.55
8.1.260.0060.00626.35
8.1.250.0070.00428.09
8.1.240.0090.00323.35
8.1.230.0080.00819.88
8.1.220.0000.01218.53
8.1.210.0000.01218.77
8.1.200.0070.00717.97
8.1.190.0050.00517.98
8.1.180.0060.00618.30
8.1.170.0000.01119.26
8.1.160.0070.00719.80
8.1.150.0040.00819.68
8.1.140.0090.00320.35
8.1.130.0000.01019.60
8.1.120.0040.00718.29
8.1.110.0030.01018.20
8.1.100.0000.01118.04
8.1.90.0050.00518.23
8.1.80.0030.00818.07
8.1.70.0040.00718.27
8.1.60.0040.01118.38
8.1.50.0080.00418.38
8.1.40.0090.00618.43
8.1.30.0030.00918.44
8.1.20.0000.01118.38
8.1.10.0070.00718.45
8.1.00.0040.01118.18
8.0.300.0000.01318.77
8.0.290.0080.00317.38
8.0.280.0030.00718.98
8.0.270.0030.00717.85
8.0.260.0060.00617.56
8.0.250.0080.00417.84
8.0.240.0070.00717.73
8.0.230.0030.01017.56
8.0.220.0030.00917.56
8.0.210.0040.01117.70
8.0.200.0040.00817.63
8.0.190.0060.01217.45
8.0.180.0080.00417.68
8.0.170.0040.00717.62
8.0.160.0040.00717.43
8.0.150.0060.00617.55
8.0.140.0030.01217.75
8.0.130.0030.01014.11
8.0.120.0030.00817.58
8.0.110.0040.01117.70
8.0.100.0000.01117.64
8.0.90.0040.00817.70
8.0.80.0100.02317.76
8.0.70.0080.00817.73
8.0.60.0000.01117.63
8.0.50.0060.00617.48
8.0.30.0130.01817.93
8.0.20.0230.01617.93
8.0.10.0040.00817.66
8.0.00.0110.02617.50
7.4.330.0030.00615.92
7.4.320.0030.00617.05
7.4.300.0040.00817.39
7.4.290.0070.00717.31
7.4.280.0000.01817.39
7.4.270.0030.00917.16
7.4.260.0050.00513.93
7.4.250.0040.00717.05
7.4.240.0070.00717.41
7.4.230.0000.01217.17
7.4.220.0120.04917.32
7.4.210.0110.02017.41
7.4.200.0040.00817.47
7.4.160.0060.02617.24
7.4.150.0160.02017.40
7.4.140.0150.02817.86
7.4.130.0340.02917.35
7.4.120.0170.03017.31
7.4.110.0110.03017.17
7.4.100.0130.03417.22
7.4.90.0090.02717.38
7.4.80.0130.04119.39
7.4.70.0160.02517.24
7.4.60.0130.02317.25
7.4.50.0100.01317.07
7.4.40.0150.02117.31
7.4.30.0030.03217.41
7.4.00.0060.01915.27
7.3.330.0000.01014.11
7.3.320.0060.00313.99
7.3.310.0060.00617.25
7.3.300.0030.00916.80
7.3.290.0060.00617.19
7.3.280.0110.02317.13
7.3.270.0160.01317.40
7.3.260.0150.02717.24
7.3.250.0150.02617.20
7.3.240.0140.03217.27
7.3.230.0090.02817.22
7.3.210.0200.02017.21
7.3.200.0160.02017.14
7.3.190.0160.02017.14
7.3.180.0060.02917.10
7.3.170.0100.03117.18
7.3.160.0110.01716.98
7.2.330.0120.02717.53
7.2.320.0060.04217.20
7.2.310.0150.02317.62
7.2.300.0120.02517.27
7.2.290.0150.02517.39
7.2.60.0030.01417.16
7.2.00.0030.01619.99
7.1.200.0220.01816.30
7.1.100.0000.01518.07
7.1.70.0030.01317.47
7.1.60.1530.02333.95
7.1.50.0530.02333.39
7.1.40.0470.03033.20
7.1.30.0800.03733.42
7.1.20.0500.03033.39
7.1.10.0370.02015.33
7.1.00.0330.02315.24
7.0.200.0630.02715.54
7.0.190.0330.03015.57
7.0.180.0330.03015.04
7.0.170.0370.03314.94
7.0.160.0400.02315.05
7.0.150.0100.01715.14
7.0.140.0430.03015.16
7.0.130.0370.02315.40
7.0.120.0370.02715.26
7.0.110.0400.02015.21
7.0.100.0330.02314.98
7.0.90.0430.02715.05
7.0.80.0430.02315.14
7.0.70.0330.03014.98
7.0.60.0570.01715.04
7.0.50.0530.02315.23
7.0.40.0500.01315.37
7.0.30.0400.02315.27
7.0.20.0330.02715.18
7.0.10.0370.02715.30
7.0.00.0300.03015.17

preferences:
56.42 ms | 401 KiB | 5 Q