binary - Show the 8 bits of a byte in PHP -


i wondering if there easy way display 8 bits of byte(or char) in php.

for example ascii encoding character '0' should return 0011 0000

thanks input!

this should job:

$bin = decbin(ord($char)); $bin = str_pad($bin, 8, 0, str_pad_left); 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -