3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = 'asdf&ddddd"fancy˝quotes˝'; echo htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, 'UTF7') . "\n"; // Output: asdf&amp;ddddd&quot;fancyË echo htmlentities($text, ENT_COMPAT | ENT_HTML401, 'UTF7') . "\n"; // Output: asdf&amp;ddddd&quot;fancy&Euml;quotes
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: htmlspecialchars(): charset `UTF7' not supported, assuming utf-8 in /in/XuIp1 on line 4 asdf&amp;ddddd&quot;fancy˝quotes˝ Warning: htmlentities(): charset `UTF7' not supported, assuming utf-8 in /in/XuIp1 on line 7 asdf&amp;ddddd&quot;fancy˝quotes˝
Output for hhvm-3.10.0 - 3.12.0
Fatal error: UTF7 is not implemented yet. in /in/XuIp1 on line 4
Process exited with code 255.
Output for 4.3.2 - 5.0.5, 5.1.1 - 5.3.29
Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /in/XuIp1 on line 4 Warning: htmlspecialchars(): charset `UTF7' not supported, assuming iso-8859-1 in /in/XuIp1 on line 4 asdf&amp;ddddd&quot;fancy˝quotes˝ Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /in/XuIp1 on line 7 Warning: htmlentities(): charset `UTF7' not supported, assuming iso-8859-1 in /in/XuIp1 on line 7 asdf&amp;ddddd&quot;fancy&Euml;�quotes&Euml;�
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/XuIp1 on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /in/XuIp1 on line 4 Warning: htmlspecialchars() [http://www.php.net/function.htmlspecialchars]: charset `UTF7' not supported, assuming iso-8859-1 in /in/XuIp1 on line 4
Process exited with code 139.