How do I echo the binary value of an integer in PHP? I tried using pack('S',$var)
but its showing no results...
decbin($number);
Returns a string containing a binary representation of the given number argument.
For instance decbin(26)
will return 11010
Source docs for decbin()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With