3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(decbin(ord(chr(1)))); for ($i=0; $i<10; $i++) { var_dump(decbin(ord(chr(1) << $i))); }
Output for 7.1.0
string(1) "1" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/f1VHG on line 5 string(6) "110000"
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
string(1) "1" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000" string(6) "110000"