3v4l.org

run code in 200+ 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 - 7.2.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.