3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = -65; printf("%d is 0x%x\n",$n,$n); $hex = sprintf("%x",$n); var_dump($hex + 0); printf("\n%d\n","0x".$hex + 0); $x = "0x".$hex; echo $x+0;
based on TlpgK
Output for 7.1.0 - 7.3.0rc4
-65 is 0xffffffffffffffbf Warning: A non-numeric value encountered in /in/XUs6p on line 6 int(0) Notice: A non well formed numeric value encountered in /in/XUs6p on line 7 0 Notice: A non well formed numeric value encountered in /in/XUs6p on line 9 0
Output for 7.0.0 - 7.0.20
-65 is 0xffffffffffffffbf int(0) 0 0
Output for 5.3.22 - 5.6.28
-65 is 0xffffffffffffffbf int(0) 0 1.844674407371E+19