3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php mb_internal_encoding("UTF-8"); $string = "\0"; $char = mb_substr($string, 0, 1); var_dump($char); // char var_dump(bin2hex($char)); // hex var_dump(hexdec(bin2hex($char))); // decimal
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.6.25, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(1) "" string(2) "00" int(0)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/Hvg0u on line 8
Process exited with code 255.