3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $b = -5; echo $b,"\n"; // -5 printf("%b\n%b\n",5,$b); // -5 $c = base_convert($b,10,2); // echo bindec($c); // 5
based on UZeFX
Output for 5.3.22 - 7.2.6
-5 101 1111111111111111111111111111111111111111111111111111111111111011 5