3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(utf8_encode("h\xE9h\x92h")); var_dump(utf8_encode(utf8_decode("h\xE9h\x92h"))); var_dump(utf8_decode(utf8_encode("h\xE9h\x92h")));
based on 5XnGH
Output for 5.2.15 - 5.2.17, 5.3.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(7) "héh’h" string(5) "h?h?h" string(5) "h�h�h"
Output for 4.3.0 - 5.2.14, 5.3.0 - 5.3.3
string(7) "héh’h" string(3) "h?h" string(5) "h�h�h"