3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<CDATA <p>World!</p> CDATA; $doc = new DOMDocument(); $doc->loadHTML($html); $children = $doc->childNodes; $pTag = $doc->getElementsByTagName('p')[0]; $worldTextNode = $pTag->childNodes[0]; $helloTextNode = new DOMElement('span', 'Hello '); $worldTextNode->parentNode->insertBefore($helloTextNode, $worldTextNode); echo is_null($helloTextNode->ownerDocument) ? 'Missing owner doc' : 'Has owner doc';

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.4.140.0150.00617.78
8.4.130.0100.01117.72
8.4.120.0100.00920.65
8.4.110.0040.00419.38
8.4.100.0120.01017.77
8.4.90.0140.00617.89
8.4.80.0030.00518.03
8.4.70.0110.00619.52
8.4.60.0140.00819.69
8.4.50.0140.00420.55
8.4.40.0060.00319.50
8.4.30.0090.01219.05
8.4.20.0100.01021.47
8.4.10.0070.01418.03
8.3.260.0100.01116.85
8.3.250.0110.00819.09
8.3.240.0100.01016.78
8.3.230.0110.00516.60
8.3.220.0100.00817.21
8.3.210.0040.00316.91
8.3.200.0110.00819.06
8.3.190.0110.00417.40
8.3.180.0090.00919.06
8.3.170.0140.00419.14
8.3.160.0120.00620.96
8.3.150.0060.01317.11
8.3.140.0100.01016.59
8.3.130.0130.00616.83
8.3.120.0030.00716.86
8.3.110.0100.00016.75
8.3.100.0110.00716.73
8.3.90.0100.00016.69
8.3.80.0140.00416.53
8.3.70.0170.00016.45
8.3.60.0150.00016.16
8.3.50.0170.00016.02
8.3.40.0040.01217.29
8.3.30.0170.00316.95
8.3.20.0170.00017.28
8.3.10.0130.00017.43
8.3.00.0140.00017.34
8.2.290.0100.00920.82
8.2.280.0070.01217.22
8.2.270.0130.00617.04
8.2.260.0140.00016.34
8.2.250.0110.00316.57
8.2.240.0100.00516.48
8.2.230.0100.00716.47
8.2.220.0130.00016.27
8.2.210.0150.00016.28
8.2.200.0070.00716.39
8.2.190.0080.00616.19
8.2.180.0060.00616.32
8.2.170.0120.00416.97
8.2.160.0100.00517.66
8.2.150.0000.01717.43
8.2.140.0140.00317.13
8.2.130.0150.00317.12
8.2.120.0130.00217.43
8.2.110.0170.00017.16
8.2.100.0150.00017.43
8.2.90.0160.00017.38
8.2.80.0100.00617.34
8.2.70.0100.00517.64
8.2.60.0140.00217.61
8.2.50.0080.00817.33
8.2.40.0110.00417.41
8.2.30.0210.00016.96
8.2.20.0090.00517.33
8.2.10.0080.00617.45
8.2.00.0100.00317.40
8.1.320.0100.01018.21

preferences:
43.06 ms | 403 KiB | 5 Q