3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<ol style="margin-top: 0cm; margin-bottom: 0cm;"> <li style="margin: 0cm 0cm 0cm 47.6px; text-align: justify; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.4px;"><span style="font-size: 10.0pt;">x</span></li> <li style="margin: 0cm 0cm 0cm 47.6px; text-align: justify; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.4px;"><span style="font-size: 10.0pt;">y</span></li> <li style="margin: 0cm 0cm 0cm 47.6px; text-align: justify; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.4px;"><span style="font-size: 10.0pt;">z</span></li> <li style="margin: 0cm 0cm 0cm 47.6px; text-align: justify; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.4px;"></li> <li style="margin: 0cm 0cm 0cm 47.6px; text-align: justify; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.4px;"><span style="font-size: 10.0pt; color: red;"> </span></li> </ol>'; $emptyLists = '//li[not(normalize-space())]'; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); foreach($xpath->query($emptyLists) as $node) { $node->parentNode->removeChild($node); } echo $dom->saveHTML($xpath->query('//ol')->item(0));

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.10.0120.00616.89
8.5.00.0090.01220.43
8.4.150.0060.00917.14
8.4.140.0110.01017.75
8.4.130.0130.00817.94
8.4.120.0160.00520.05
8.4.110.0110.00819.23
8.4.100.0090.00818.07
8.4.90.0070.00418.29
8.4.80.0050.00318.05
8.4.70.0080.00918.04
8.4.60.0130.01018.97
8.4.50.0120.00918.26
8.4.40.0170.00318.05
8.4.30.0060.01220.85
8.4.20.0030.01619.94
8.4.10.0090.00019.97
8.3.280.0030.00014.05
8.3.270.0140.00717.04
8.3.260.0120.00816.92
8.3.250.0140.00617.66
8.3.240.0130.00617.49
8.3.230.0070.00616.86
8.3.220.0050.00617.62
8.3.210.0120.00816.79
8.3.200.0060.00317.05
8.3.190.0070.00517.55
8.3.180.0110.00817.11
8.3.170.0160.00316.89
8.3.160.0040.00417.60
8.3.150.0090.01217.09
8.3.140.0150.00317.19
8.3.130.0030.00618.66
8.3.120.0060.00320.98
8.3.110.0080.00818.97
8.3.100.0350.01137.54
8.3.90.0310.00837.54
8.3.80.0280.00937.54
8.3.70.0220.00437.54
8.3.60.0190.00637.54
8.3.50.0240.00537.54
8.3.40.0250.00937.54
8.3.30.0260.00637.54
8.3.20.0270.00737.54
8.3.10.0210.00337.54
8.3.00.0160.00637.54
8.2.290.0120.00820.93
8.2.280.0140.00519.16
8.2.270.0040.01417.34
8.2.260.0070.01117.20
8.2.250.0040.00417.03
8.2.240.0080.00017.68
8.2.230.0040.00420.94
8.2.220.0100.00737.54
8.2.210.0260.00437.54
8.2.200.0230.00937.54
8.2.190.0260.00837.54
8.2.180.0200.00937.54
8.2.170.0310.00737.54
8.2.160.0280.00537.54
8.2.150.0270.00737.54
8.2.140.0290.00437.54
8.2.130.0280.00537.54
8.2.120.0310.00237.54
8.2.110.0270.00637.54
8.2.100.0350.00737.54
8.2.90.0310.00837.54
8.2.80.0330.00937.54
8.2.70.0260.00737.54
8.2.60.0320.00837.54
8.2.50.0380.00337.54
8.2.40.0340.01037.54
8.2.30.0370.00337.54
8.2.20.0360.00737.54
8.2.10.0330.00837.54
8.2.00.0250.01137.54
8.1.330.0130.00622.66
8.1.320.0100.01016.73
8.1.310.0060.01216.79
8.1.300.0090.00616.89
8.1.290.0290.00937.54
8.1.280.0310.00337.54
8.1.270.0210.00437.54
8.1.260.0300.00837.54
8.1.250.0320.01337.54
8.1.240.0300.01137.54
8.1.230.0310.00637.54
8.1.220.0270.00337.54
8.1.210.0230.00637.54
8.1.200.0290.01437.54
8.1.190.0340.00937.54
8.1.180.0320.00937.54
8.1.170.0250.00737.54
8.1.160.0300.00937.54
8.1.150.0340.00537.54
8.1.140.0290.01037.54
8.1.130.0280.01137.54
8.1.120.0320.00537.54
8.1.110.0280.01037.54
8.1.100.0310.00537.54
8.1.90.0320.00337.54
8.1.80.0280.00837.54
8.1.70.0270.01237.54
8.1.60.0340.00737.54
8.1.50.0350.00737.54
8.1.40.0340.00837.54
8.1.30.0230.00837.54
8.1.20.0410.00437.54
8.1.10.0280.00537.54
8.1.00.0260.00837.54

preferences:
38.07 ms | 403 KiB | 5 Q