3v4l.org

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