3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $writer = new XMLWriter; $writer->openURI('php://output'); $writer->startDocument('1.0', 'UTF-8'); $writer->startElement('response'); $writer->startElement('status'); $writer->startAttribute('code'); $writer->text(htmlspecialchars("<>\u{b}", ENT_NOQUOTES | ENT_XML1 | ENT_DISALLOWED, true)); $writer->endAttribute(); $writer->endElement(); $writer->endElement(); $writer->endDocument(); var_dump(bin2hex (" " . "\u{b}"));
based on ePeaR
Output for 7.0.0 - 7.3.0rc3
Warning: htmlspecialchars(): charset `1' not supported, assuming utf-8 in /in/BLiEC on line 9 <?xml version="1.0" encoding="UTF-8"?> <response><status code="&amp;lt;&amp;gt;�"/></response> string(4) "0b0b"
Output for hhvm-3.18.4 - 3.21.0
Notice: Use of undefined constant ENT_DISALLOWED - assumed 'ENT_DISALLOWED' in /in/BLiEC on line 9 Fatal error: 1 is not implemented yet. in /in/BLiEC on line 9
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Warning: htmlspecialchars(): charset `1' not supported, assuming utf-8 in /in/BLiEC on line 9 <?xml version="1.0" encoding="UTF-8"?> <response><status code="&amp;lt;&amp;gt;\u{b}"/></response> string(12) "0b5c757b627d"