3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('display_errors', 1); $d = new DOMDocument(); $html = "<!DOCTYPE html><html><head><meta charset='UTF-8'></head><body>U+0000 <span>\x0</span>Hello?</body></html>"; $d->loadHTML($html); print($d->saveHTML());
based on ZkKkD
Output for 5.3.21 - 5.4.39, 5.4.42 - 5.4.45, 5.5.26 - 5.5.35, 5.6.10 - 7.2.0
<!DOCTYPE html> <html><head><meta charset="UTF-8"></head><body>U+0000 <span></span></body></html>
Output for 5.4.40 - 5.4.41, 5.5.24 - 5.5.25, 5.6.8 - 5.6.9
Warning: DOMDocument::loadHTML() expects parameter 1 to be a valid path, string given in /in/ffC0B on line 6