3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $markup = <<<EOT <!DOCTYPE HTML> <html> <body> <audio src="foo.ogg"> <track kind="captions" src="foo.en.vtt" srclang="en" label="English"> <track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska"> </audio> </body> </html> EOT; $dom = new DOMDocument(); $dom->loadHTML($markup); print $dom->saveHTML();
Output for 5.3.3 - 7.1.0
Warning: DOMDocument::loadHTML(): Tag audio invalid in Entity, line: 4 in /in/imJER on line 15 Warning: DOMDocument::loadHTML(): Tag track invalid in Entity, line: 5 in /in/imJER on line 15 Warning: DOMDocument::loadHTML(): Tag track invalid in Entity, line: 6 in /in/imJER on line 15 <!DOCTYPE HTML> <html><body> <audio src="foo.ogg"><track kind="captions" src="foo.en.vtt" srclang="en" label="English"><track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska"></track></track></audio></body></html>
Output for 5.0.0 - 5.1.1, 5.1.3 - 5.3.2
Warning: DOMDocument::loadHTML(): Tag audio invalid in Entity, line: 4 in /in/imJER on line 15 Warning: DOMDocument::loadHTML(): Tag track invalid in Entity, line: 5 in /in/imJER on line 15 Warning: DOMDocument::loadHTML(): Tag track invalid in Entity, line: 6 in /in/imJER on line 15 <!DOCTYPE HTML> <html><body> <audio src="foo.ogg"><track kind="captions" src="foo.en.vtt" srclang="en" label="English"><track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska"></track></track></audio> </body></html>
Output for 5.1.2
Warning: DOMDocument::loadHTML(): Tag audio invalid in Entity, line: 4 in /in/imJER on line 16 Warning: DOMDocument::loadHTML(): Tag track invalid in Entity, line: 5 in /in/imJER on line 16 Warning: DOMDocument::loadHTML(): Tag track invalid in Entity, line: 6 in /in/imJER on line 16 <!DOCTYPE HTML> <html><body> <audio src="foo.ogg"><track kind="captions" src="foo.en.vtt" srclang="en" label="English"><track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska"></track></track></audio> </body></html>
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/imJER on line 14
Process exited with code 255.
Output for 4.4.2
Fatal error: Cannot instantiate non-existent class: domdocument in /in/imJER on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/imJER on line 14