3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $profile = "<div lang=ja><p>イリノイ州シカゴにて、アイルランド系の家庭に、</p></div>"; $dom = new DOMDocument(); $dom->loadHTML($profile); echo $dom->saveHTML(); echo $profile;
Output for 5.0.0 - 7.1.0
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><div lang="ja"><p>&atilde;&#130;&curren;&atilde;&#131;&ordf;&atilde;&#131;&#142;&atilde;&#130;&curren;&aring;&middot;&#158;&atilde;&#130;&middot;&atilde;&#130;&laquo;&atilde;&#130;&acute;&atilde;&#129;&laquo;&atilde;&#129;&brvbar;&atilde;&#128;&#129;&atilde;&#130;&cent;&atilde;&#130;&curren;&atilde;&#131;&laquo;&atilde;&#131;&copy;&atilde;&#131;&sup3;&atilde;&#131;&#137;&ccedil;&sup3;&raquo;&atilde;&#129;&reg;&aring;&reg;&para;&aring;&ordm;&shy;&atilde;&#129;&laquo;&atilde;&#128;&#129;</p></div></body></html> <div lang=ja><p>イリノイ州シカゴにて、アイルランド系の家庭に、</p></div>
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/0qi1R 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/0qi1R on line 4