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))); } var_dump(decbin(ord(chr(24)))); for ($i=0; $i<10; $i++) { var_dump(decbin(ord(chr(24) >> $i))); }
Output for 7.1.0
string(1) "1" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 5 string(6) "110000" string(5) "11000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000" Warning: A non-numeric value encountered in /in/uEI1R on line 10 string(6) "110000"
Output for 4.3.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" string(5) "11000" 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"