3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = new DomDocument; $d->loadHTML('</div>'); echo $d->saveHTML(); //.
Output for 5.0.0 - 5.0.5, 5.1.1, 5.1.3 - 5.1.4, 5.1.6 - 5.6.28, 7.0.0 - 7.1.0
Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 1 in /in/mGfGr on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Output for hhvm-3.12.0
Warning: Unexpected end tag : div in Entity, line: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.2, 5.1.5
//. Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 1 in /in/mGfGr on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/mGfGr on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/mGfGr on line 3
Process exited with code 255.
Output for 4.4.2
//. Fatal error: Cannot instantiate non-existent class: domdocument in /in/mGfGr on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/mGfGr on line 3