3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function bindump($ord) { printf("%016b\n", ord($ord)); } $one = "a"; bindump($one); for ($i=0; $i<10; $i++) { bindump($one << $i); }
Output for 7.1.0
0000000001100001 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000 Warning: A non-numeric value encountered in /in/6GHVi on line 13 0000000000110000
Output for 4.3.0 - 7.0.14
0000000001100001 0000000000110000 0000000000110000 0000000000110000 0000000000110000 0000000000110000 0000000000110000 0000000000110000 0000000000110000 0000000000110000 0000000000110000