3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $html = "<link rel='stylesheet' href='http://www.foo.com/bar/baz.min.css' type='text/css' id='23434' foo='bar' media='all'/>"; $dom = new DOMDocument(); $dom->loadHTML($html); $link = $dom->getElementById('23434'); $link->removeAttribute('foo'); echo $dom->saveXML($link); ?>
Output for 5.0.0 - 7.1.0
<link rel="stylesheet" href="http://www.foo.com/bar/baz.min.css" type="text/css" id="23434" media="all"/>
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/vg8ht on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/vg8ht on line 4