3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $num = "0xa"; $hexstr = sprintf("%x",( $num + 3)); // 0 $hexstr2 = sprintf("%x", hexdec($num) + 3 ); var_dump($hexstr,$hexstr2);
based on C7Ch4
Output for 7.1.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/1nlsv on line 4 string(1) "3" string(1) "d"
Output for 7.0.0 - 7.0.20
string(1) "3" string(1) "d"
Output for 5.3.19 - 5.6.28
string(1) "d" string(1) "d"