3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <p>Ple ple ple BLA xo xo xo <span class="tooltip-content"><span class="tooltip-text">uuu BLA pla</span></span> he BLAZE he BLA he ha ha ha.</p> HTML; $find = 'BLA'; $doc = new DOMDocument(); $doc->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($doc); foreach ($xpath->query('//text()[not(ancestor::span[contains(@class, "tooltip-content")])]') as $node) { $node->nodeValue = preg_replace("/(\s)?\b$find\b(?(1)|\s*)/", '', $node->nodeValue); } echo $doc->saveHTML();

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.0110.00917.00
8.5.00.0090.01220.52
8.4.150.0030.00014.05
8.4.140.0110.01118.29
8.4.130.0110.00919.05
8.4.120.0100.01024.29
8.4.110.0100.00718.45
8.4.100.0130.00819.26
8.4.90.0150.00620.95
8.4.80.0050.00419.32
8.4.70.0140.00819.39
8.4.60.0080.01218.95
8.4.50.0110.01419.19
8.4.40.0150.00718.36
8.4.30.0110.00820.89
8.4.20.0130.00620.19
8.4.10.0030.00619.82
8.3.280.0170.01018.73
8.3.270.0130.00816.96
8.3.260.0120.00817.22
8.3.250.0100.00819.01
8.3.240.0110.00817.55
8.3.230.0100.00617.10
8.3.220.0030.00519.41
8.3.210.0070.00117.00
8.3.200.0040.00617.41
8.3.190.0120.00817.53
8.3.180.0070.00919.24
8.3.170.0040.00419.15
8.3.160.0110.00719.14
8.3.150.0090.00017.39
8.3.140.0000.00817.39
8.3.130.0060.00317.21
8.3.120.0130.00719.22
8.3.110.0080.00017.41
8.3.100.0400.00937.54
8.3.90.0330.01537.54
8.3.80.0400.01037.54
8.3.70.0270.00737.54
8.3.60.0190.00437.54
8.3.50.0280.00637.54
8.3.40.0240.00837.54
8.3.30.0340.00637.54
8.3.20.0410.00337.54
8.3.10.0270.00537.54
8.3.00.0320.01137.54
8.2.290.0090.00820.91
8.2.280.0110.00820.54
8.2.270.0090.00617.18
8.2.260.0030.00616.92
8.2.250.0090.00618.91
8.2.240.0000.00817.69
8.2.230.0040.00420.94
8.2.220.0230.00337.54
8.2.210.0340.00637.54
8.2.200.0250.01737.54
8.2.190.0350.01237.54
8.2.180.0320.00737.54
8.2.170.0290.01537.54
8.2.160.0330.01237.54
8.2.150.0360.01137.54
8.2.140.0380.00837.54
8.2.130.0230.00837.54
8.2.120.0250.00337.54
8.2.110.0210.00037.54
8.2.100.0100.01037.54
8.2.90.0320.00637.54
8.2.80.0200.01637.54
8.2.70.0410.00637.54
8.2.60.0360.00037.54
8.2.50.0250.01437.54
8.2.40.0310.00937.54
8.2.30.0270.00937.54
8.2.20.0270.01437.54
8.2.10.0380.00337.54
8.2.00.0310.01037.54
8.1.330.0110.00822.02
8.1.320.0120.00916.72
8.1.310.0050.00318.48
8.1.300.0100.01020.85
8.1.290.0330.00837.54
8.1.280.0300.01137.54
8.1.270.0190.00537.54
8.1.260.0210.01037.54
8.1.250.0250.01137.54
8.1.240.0350.00337.54
8.1.230.0300.00937.54
8.1.220.0330.00737.54
8.1.210.0280.01837.54
8.1.200.0300.00737.54
8.1.190.0300.00637.54
8.1.180.0330.00637.54
8.1.170.0220.00937.54
8.1.160.0200.01037.54
8.1.150.0170.00837.54
8.1.140.0150.00437.54
8.1.130.0060.01237.54
8.1.120.0130.00537.54
8.1.110.0150.00437.54
8.1.100.0140.00537.54
8.1.90.0340.01137.54
8.1.80.0390.00737.54
8.1.70.0280.01437.54
8.1.60.0360.00837.54
8.1.50.0290.01437.54
8.1.40.0340.01437.54
8.1.30.0290.00337.54
8.1.20.0210.01537.54
8.1.10.0320.00637.54
8.1.00.0320.01137.54

preferences:
60.79 ms | 403 KiB | 5 Q