3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $doc->loadHTML('<html><body bar="">Test<br></body></html>'); var_export([ 'foo' => $doc->getElementsByTagName('body')[0]->getAttribute('foo'), 'bar' => $doc->getElementsByTagName('body')[0]->getAttribute('bar'), ]);

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.5.20.0070.01520.54
8.5.10.0050.00416.85
8.5.00.0170.00720.15
8.4.170.0120.00924.11
8.4.160.0110.00922.29
8.4.150.0020.00114.05
8.4.140.0150.00717.81
8.4.130.0110.00919.69
8.4.120.0100.00824.40
8.4.110.0130.00822.37
8.4.100.0080.00717.92
8.4.90.0140.00618.13
8.4.80.0170.00819.68
8.4.70.0190.00719.57
8.4.60.0370.00818.02
8.4.50.0320.00917.96
8.4.40.0430.00717.60
8.4.30.0440.00817.71
8.4.20.0370.00617.82
8.4.10.0350.00617.65
8.3.300.0110.01021.07
8.3.290.0100.01121.09
8.3.280.0110.00920.34
8.3.270.0090.01016.96
8.3.260.0100.00716.49
8.3.250.0100.00719.19
8.3.240.0110.00817.34
8.3.230.0100.01016.65
8.3.220.0150.00616.97
8.3.210.0190.00716.97
8.3.200.0410.00616.97
8.3.190.0340.00516.97
8.3.180.0400.00816.97
8.3.170.0420.00916.97
8.3.160.0360.00716.97
8.3.150.0210.00316.97
8.3.140.0210.00516.97
8.3.130.0190.00316.99
8.3.120.0190.00416.97
8.3.110.0200.00316.97
8.3.100.0300.00716.97
8.3.90.0340.00516.97
8.3.80.0420.00916.97
8.3.70.0350.00616.97
8.3.60.0320.00516.97
8.3.50.0370.01016.97
8.3.40.0300.00717.46
8.3.30.0370.00917.31
8.3.20.0350.00817.41
8.3.10.0250.01217.67
8.3.00.0250.00717.53
8.2.300.0100.01020.40
8.2.290.0080.00520.66
8.2.280.0210.00817.07
8.2.270.0260.00516.97
8.2.260.0330.01016.97
8.2.250.0280.00716.97
8.2.240.0270.00716.97
8.2.230.0370.00716.97
8.2.220.0380.00516.97
8.2.210.0360.00416.97
8.2.200.0230.00816.97
8.2.190.0260.00716.97
8.2.180.0250.00616.97
8.2.170.0350.01317.82
8.2.160.0370.00817.74
8.2.150.0390.00917.65
8.2.140.0280.00617.75
8.2.130.0280.00817.67
8.2.120.0290.00517.63
8.2.110.0300.01017.60
8.2.100.0400.00717.58
8.2.90.0330.01217.59
8.2.80.0360.00717.42
8.2.70.0350.00917.64
8.2.60.0370.00817.60
8.2.50.0310.00717.59
8.2.40.0300.00517.69
8.2.30.0270.00817.57
8.2.20.0280.00617.48
8.2.10.0270.00517.49
8.2.00.0250.00617.60
8.1.340.0100.00920.57

preferences:
29.47 ms | 403 KiB | 5 Q