3v4l.org

run code in 300+ PHP versions simultaneously
<div div="first-slide"></div> <div div="container"></div> <?php htmlString = '<html>...</html>';//either generated, or loaded from a file $dom = new DOMDocument; $dom->loadHTML($htmlString);//or loadHTMLFile $divs = $dom->getElementsByTagName('div'); foreach($divs as $div) { if ($div->hasAttribute('class') && strstr($div->getAttribute('class'), 'first-slide')) { //$div ~= <div class='one-two-three'> $div->appendChild( echo '<div class="wrapper"></div>';);//check the docs to see what you can do } } ?>

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)
5.4.280.0060.03912.36
5.4.270.0070.03912.36
5.4.260.0090.03812.36
5.4.250.0060.04012.36
5.4.240.0080.03612.36
5.4.230.0080.03512.36
5.4.220.0110.03812.36
5.4.210.0050.03712.36
5.4.200.0050.04412.36
5.4.190.0090.04912.35
5.4.180.0070.05012.35
5.4.170.0090.04912.36
5.4.160.0080.03712.36
5.4.150.0090.03612.35
5.4.140.0080.03812.04
5.4.130.0080.03512.02
5.4.120.0080.04811.98
5.4.110.0080.03911.98
5.4.100.0050.03611.98
5.4.90.0030.04011.98
5.4.80.0090.03611.98
5.4.70.0060.03511.98
5.4.60.0100.04511.98
5.4.50.0100.04611.98
5.4.40.0110.04511.97
5.4.30.0140.03111.96
5.4.20.0070.03411.96
5.4.10.0050.03611.96
5.4.00.0030.03811.46
5.3.280.0070.03712.71
5.3.270.0100.03512.73
5.3.260.0060.04112.72
5.3.250.0100.03712.72
5.3.240.0060.05412.72
5.3.230.0130.05212.71
5.3.220.0090.03712.68
5.3.210.0050.04212.68
5.3.200.0060.03612.68
5.3.190.0060.04612.67
5.3.180.0090.04712.68
5.3.170.0070.03812.67
5.3.160.0080.05112.68
5.3.150.0080.04312.67
5.3.140.0080.04912.66
5.3.130.0080.04912.66
5.3.120.0110.04512.66
5.3.110.0070.03812.66
5.3.100.0070.03712.12
5.3.90.0090.03612.09
5.3.80.0060.03812.07
5.3.70.0040.03712.08
5.3.60.0040.03912.06
5.3.50.0080.04312.00
5.3.40.0100.04812.00
5.3.30.0100.04911.94
5.3.20.0130.04411.70
5.3.10.0090.04811.67
5.3.00.0110.03211.65

preferences:
136.09 ms | 1394 KiB | 7 Q