Home  >  Article  >  Backend Development  >  Convert integer to binary

Convert integer to binary

WBOY
WBOYOriginal
2016-07-25 09:01:511455browse
  1. function int2b($int=0){
  2. if($int>0){
  3. return int2b(floor($int/2)).$int%2;
  4. }
  5. }
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn