3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 65; $b = ~$a + 1; // get 2s complement echo $b,"\n"; printf("0x%x\n\n",$b); $c = base_convert($b,10,2); echo $c,"\n"; $i = intval($c,2); echo $i;
based on BUsfP
Output for 5.3.22 - 7.3.1
-65 0xffffffffffffffbf 1000001 65