How to echo a binary integer value in PHP? I tried using pack('S',$var) but didn't show any results ...
pack('S',$var)
decbin($number);
Returns a string containing the binary representation of the argument of the given number.
For example, decbin(26) will return 11010
decbin(26)
11010
Source documents for decbin ()
<?php echo base_convert($number, 10, 2); ?>
http://php.net/manual/en/function.base-convert.php
string base_convert ( string $number , int $frombase , int $tobase )
Source: https://habr.com/ru/post/1412754/More articles:How to recursively grep when there is a FIFO in the path - shellgoogle oauth2 grant_type = authorization_code returns Error Handling OAuth 2 Request - oauthCompiling 3.2 Antlr grammar with gradle - antlrEmber and Ember StateManager data - ember.jsHow to check phone number using javascript? - javascriptDebugging core files generated in a client window - c ++How to listen to a key press on a soft keyboard? - androidOptimizing a huge unordered list with Javascript - optimizationGAE Search API - useful for reversing twitter style? - google-app-engineIf the GUID is to be used as a foreign key for many tables - databaseAll Articles