3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<'HTML' <body>bar bar HTML; echo "Strict Error Checking: FALSE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = FALSE; $document->loadXML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; echo "Strict Error Checking: TRUE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = TRUE; $document->loadXML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; libxml_use_internal_errors(TRUE); echo "Strict Error Checking: FALSE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = FALSE; $document->loadHTML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; echo "Strict Error Checking: TRUE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = TRUE; $document->loadHTML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; $document = new DOMDocument(); $document->appendChild($document->createElement('foo')); $document->appendChild($document->createElement('foo')); echo $document->saveXML(); $document = new DOMDocument(); $document->strictErrorChecking = TRUE; $document->appendChild($document->createElement('foo')); $document->appendChild($document->createElement('foo')); echo $document->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.0090.00617.13
8.3.60.0120.00918.80
8.3.50.0120.00316.91
8.3.40.0150.00419.29
8.3.30.0060.00919.17
8.3.20.0080.00024.18
8.3.10.0030.00624.66
8.3.00.0040.00426.16
8.2.190.0130.00618.56
8.2.180.0120.00625.92
8.2.170.0060.00919.30
8.2.160.0170.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00426.35
8.2.110.0030.00722.59
8.2.100.0080.00418.22
8.2.90.0040.00419.71
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0040.00418.15
8.2.50.0040.00418.05
8.2.40.0080.00018.59
8.2.30.0040.00418.46
8.2.20.0000.00818.39
8.2.10.0040.00419.60
8.2.00.0000.00719.65
8.1.280.0150.00025.92
8.1.270.0040.00424.21
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0100.00023.98
8.1.230.0040.00823.12
8.1.220.0040.00418.16
8.1.210.0040.00718.77
8.1.200.0110.00017.73
8.1.190.0030.00517.60
8.1.180.0000.00819.38
8.1.170.0050.00318.99
8.1.160.0020.00519.33
8.1.150.0040.00419.19
8.1.140.0040.00419.16
8.1.130.0070.00020.52
8.1.120.0040.00417.71
8.1.110.0030.00517.72
8.1.100.0000.00817.75
8.1.90.0050.00317.86
8.1.80.0040.00417.84
8.1.70.0030.00717.87
8.1.60.0080.00017.83
8.1.50.0000.00817.79
8.1.40.0060.00317.81
8.1.30.0030.00517.80
8.1.20.0030.00618.03
8.1.10.0030.00617.89
8.1.00.0050.00517.98
8.0.300.0000.00820.44
8.0.290.0040.00417.13
8.0.280.0040.00418.69
8.0.270.0040.00418.44
8.0.260.0060.00318.76
8.0.250.0000.00717.38
8.0.240.0000.00717.33
8.0.230.0040.00417.16
8.0.220.0040.00417.27
8.0.210.0000.00717.19
8.0.200.0000.00717.25
8.0.190.0000.00917.43
8.0.180.0070.00017.26
8.0.170.0060.00317.27
8.0.160.0070.00017.36
8.0.150.0070.00117.12
8.0.140.0000.00717.30
8.0.130.0060.00013.72
8.0.120.0040.00417.26
8.0.110.0040.00417.25
8.0.100.0000.00717.08
8.0.90.0050.00217.05
8.0.80.0080.00717.29
8.0.70.0040.00417.07
8.0.60.0020.00517.34
8.0.50.0050.00317.33
8.0.30.0050.01517.23
8.0.20.0100.00717.27
8.0.10.0070.01017.31
8.0.00.0070.01517.38
7.4.330.0020.00215.55
7.4.320.0000.00616.86
7.4.300.0030.00317.00
7.4.290.0030.00516.80
7.4.280.0030.00616.96
7.4.270.0030.00316.75
7.4.260.0030.00313.72
7.4.250.0040.00417.00
7.4.240.0030.00316.86
7.4.230.0000.00717.01
7.4.220.0050.00216.75
7.4.210.0070.00716.78
7.4.200.0030.00516.83
7.4.160.0060.01016.97
7.4.150.0000.01616.84
7.4.140.0070.01016.85
7.4.130.0090.00616.60
7.4.120.0100.00716.80
7.4.110.0090.01516.93
7.4.100.0060.01316.71
7.4.90.0030.01716.81
7.4.80.0060.01516.84
7.4.70.0090.00916.87
7.4.60.0070.01316.88
7.4.50.0040.01816.70
7.4.40.0120.00916.72
7.4.30.0070.01016.92
7.4.20.0100.00616.84
7.4.10.0090.00616.80
7.4.00.0080.00816.69
7.3.330.0030.00316.65
7.3.320.0030.00313.56
7.3.310.0030.00316.65
7.3.300.0030.00316.66
7.3.290.0070.01116.67
7.3.280.0000.01816.55
7.3.270.0120.00416.67
7.3.260.0090.00616.66
7.3.250.0070.01116.75
7.3.240.0070.01016.68
7.3.230.0090.01216.70
7.3.220.0060.00916.62
7.3.210.0030.01816.55
7.3.200.0060.01416.58
7.3.190.0120.00916.50
7.3.180.0170.00316.52
7.3.170.0130.01016.51
7.3.160.0070.01016.50
7.3.150.0060.00916.67
7.3.140.0090.00616.59
7.3.130.0040.01216.46
7.3.120.0000.01516.48
7.3.110.0080.00816.48
7.3.100.0040.01116.57
7.3.90.0090.00616.90
7.3.80.0070.01116.65
7.3.70.0070.01116.63
7.3.60.0090.00616.79
7.3.50.0120.00316.84
7.3.40.0060.01016.72
7.3.30.0040.01516.79
7.3.20.0110.01016.77
7.3.10.0110.01116.57
7.3.00.0110.00516.77

preferences:
54.65 ms | 404 KiB | 6 Q