3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = 'asdf&ddddd"fancy˝quotes˝'; echo htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, 'UTF-8') . "\n"; // Output: asdf&amp;ddddd&quot;fancyË echo htmlentities($text, ENT_COMPAT | ENT_HTML401, 'UTF-8') . "\n"; // Output: asdf&amp;ddddd&quot;fancy&Euml;quotes
Output for 4.3.2 - 5.0.5, 5.1.1 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
asdf&amp;ddddd&quot;fancy˝quotes˝ asdf&amp;ddddd&quot;fancy˝quotes˝
Output for 5.1.0
<br /> <b>Fatal error</b>: fatal flex scanner internal error--end of buffer missed in <b>/in/XYedd</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1

Process exited with code 139.