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'; print_r($xpath->query($query)); $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.70.0210.01017.38
8.3.60.0070.02017.34
8.3.50.0080.01517.22
8.3.40.0240.01019.47
8.3.30.0130.01019.26
8.3.20.0060.00621.01
8.3.10.0030.01022.65
8.3.00.0030.01021.56
8.2.180.0030.02019.26
8.2.170.0040.01822.96
8.2.160.0150.01123.13
8.2.150.0090.00324.18
8.2.140.0100.00324.66
8.2.130.0070.00422.77
8.2.120.0040.00926.35
8.2.110.0120.00321.11
8.2.100.0100.00618.59
8.2.90.0060.00619.88
8.2.80.0040.01118.91
8.2.70.0070.00718.25
8.2.60.0000.01318.80
8.2.50.0030.01018.55
8.2.40.0120.00323.20
8.2.30.0100.00321.94
8.2.20.0100.00318.89
8.2.10.0030.00918.87
8.2.00.0000.01218.92
8.1.280.0140.01125.92
8.1.270.0060.00624.82
8.1.260.0080.00426.35
8.1.250.0030.01028.09
8.1.240.0080.00823.40
8.1.230.0070.01120.04
8.1.220.0030.01018.66
8.1.210.0030.01018.77
8.1.200.0060.01218.23
8.1.190.0030.00918.10
8.1.180.0060.00618.40
8.1.170.0030.01019.40
8.1.160.0090.00619.84
8.1.150.0060.00919.70
8.1.140.0030.00920.35
8.1.130.0000.01219.69
8.1.120.0060.00618.16
8.1.110.0030.01018.32
8.1.100.0040.01118.22
8.1.90.0040.01118.32
8.1.80.0030.00918.11
8.1.70.0060.00618.36
8.1.60.0030.01318.46
8.1.50.0060.01018.20
8.1.40.0040.01118.40
8.1.30.0000.01518.26
8.1.20.0070.00718.53
8.1.10.0070.00718.47
8.1.00.0110.00318.33
8.0.300.0060.00618.87
8.0.290.0090.00617.63
8.0.280.0030.00919.28
8.0.270.0030.01118.07
8.0.260.0090.00319.20
8.0.250.0030.00917.80
8.0.240.0040.01117.65
8.0.230.0040.01117.84
8.0.220.0040.00817.73
8.0.210.0080.00417.62
8.0.200.0000.01217.69
8.0.190.0030.01517.63
8.0.180.0030.01017.77
8.0.170.0090.00317.80
8.0.160.0030.01017.68
8.0.150.0030.00917.79
8.0.140.0000.01317.74
8.0.130.0060.00614.15
8.0.120.0070.00717.48
8.0.110.0080.00417.75
8.0.100.0000.01517.64
8.0.90.0000.01517.62
8.0.80.0050.02717.70
8.0.70.0030.01317.44
8.0.60.0030.01017.62
8.0.50.0000.01317.55
8.0.30.0170.01917.96
8.0.20.0100.02717.80
8.0.10.0000.01417.83
8.0.00.0240.01317.36
7.4.330.0030.00915.55
7.4.320.0000.01117.38
7.4.300.0060.00817.27
7.4.290.0130.00017.39
7.4.280.0000.01617.38
7.4.270.0060.00917.29
7.4.260.0040.00714.06
7.4.250.0030.01017.21
7.4.240.0060.00617.35
7.4.230.0030.00917.10
7.4.220.0210.01817.36
7.4.210.0100.02817.30
7.4.200.0060.00617.19
7.4.160.0190.01617.19
7.4.150.0130.02217.43
7.4.140.0160.02917.86
7.4.130.0190.01917.11
7.4.120.0120.02717.22
7.4.110.0150.02117.33
7.4.100.0180.02217.11
7.4.90.0150.03517.24
7.4.80.0110.02319.39
7.4.70.0150.01917.36
7.4.60.0120.03917.34
7.4.50.0130.01317.05
7.4.40.0120.02717.25
7.4.30.0120.03017.35
7.4.00.0060.02215.72
7.3.330.0000.01114.05
7.3.320.0000.01314.00
7.3.310.0070.00717.20
7.3.300.0090.00317.10
7.3.290.0030.01017.10
7.3.280.0130.02417.06
7.3.270.0180.01817.40
7.3.260.0190.02617.19
7.3.250.0170.02617.13
7.3.240.0190.02017.08
7.3.230.0190.01317.23
7.3.210.0130.02317.19
7.3.200.0260.00917.07
7.3.190.0130.02217.18
7.3.180.0130.02917.19
7.3.170.0170.01717.16
7.3.160.0240.01617.24
7.3.10.0080.01117.14
7.3.00.0100.01317.34
7.2.330.0160.01917.52
7.2.320.0170.02417.29
7.2.310.0150.02417.13
7.2.300.0140.02617.45
7.2.290.0070.03417.61
7.2.130.0060.01617.54
7.2.120.0030.02017.48
7.2.110.0090.01517.27
7.2.100.0070.02317.34
7.2.90.0060.01317.54
7.2.80.0090.01217.37
7.2.70.0040.02217.41
7.2.60.0090.01617.12
7.2.50.0180.00917.24
7.2.40.0030.01717.52
7.2.30.0100.01617.29
7.2.20.0100.01317.35
7.2.10.0130.01317.55
7.2.00.0080.01518.85
7.1.250.0060.01616.23
7.1.200.0100.01915.97
7.1.100.0070.01318.80
7.1.70.0000.01517.83
7.1.60.0430.02334.09
7.1.50.0430.02333.73
7.1.40.0330.03333.34
7.1.30.0370.02733.41
7.1.20.0400.03333.32
7.1.10.0330.02015.39
7.1.00.0370.02315.39
7.0.200.0330.03315.66
7.0.190.0470.01315.18
7.0.180.0400.02015.11
7.0.170.0300.02315.13
7.0.160.0270.02715.04
7.0.150.0330.02014.89
7.0.140.0100.02315.11
7.0.130.0370.02015.34
7.0.120.0430.03015.32
7.0.110.0370.02715.18
7.0.100.0430.02014.98
7.0.90.0100.03315.15
7.0.80.0130.03015.15
7.0.70.0400.03015.24
7.0.60.0330.02314.86
7.0.50.0330.02015.13
7.0.40.0430.02715.35
7.0.30.0270.03015.32
7.0.20.0400.01715.18
7.0.10.0330.02715.13
7.0.00.0430.01715.06

preferences:
44.29 ms | 401 KiB | 5 Q