decToBin() public static method

This method returns a binary string representation of the decimal number. Used for the doubleAndAdd() method.
See also: http://php.net/manual/en/function.decbin.php but for large numbers
public static decToBin ( $dec ) : string
return string
示例#1
0
 public function testDecToBin()
 {
     $data = array(array('123456789', '101010001011001111011010111'), array('0x123456789', '100100011110011010100010110001001'));
     foreach ($data as $datum) {
         $this->assertSame($datum[1], Util::decToBin($datum[0]));
     }
 }