Guest User

Untitled

a guest
Dec 13th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. <?php
  2.    function decbin2($num){
  3.       while($num >= 1){
  4.         $bin .= $num % 2;
  5.         $num /= 2;
  6.       }  
  7.       return ($num<1) ? "0" : strrev($bin);
  8.    }
  9. ?>
Add Comment
Please, Sign In to add comment