Lines Matching +full:- +full:i
18 * @param $pow 0-64 power of 2 for bitmask
29 $mask = Ip32::makeBitmaskOn32(64 - $pow);
33 for ($i = 0; $i < 64; $i++) {
34 if (bcmul($bin[$i], $mask[$i]) == 1) {
35 $res = bcadd($res, bcpow(2, 63 - $i));
43 * modeling bitshift like ~0 << $pow for 32-bit arch
45 * @return 64-char string of 1 and 0s
55 $pow = $pow < 0 ? 64 - $pow : $pow;
57 for ($i = 0; $i < 64; $i++) {
58 if ($i >= $pow) {
59 $mask[63 - $i] = '1';
66 * conversion of inet_pton ipv6 into 64-bit upper and lower
67 * bcmath version for 32-bit architecture
68 * w/o no unpack('J') - unsigned long long (always 64 bit, big endian byte order)
78 // unpack into four 32-bit unsigned ints to recombine as 2 64-bit
95 * Convert a decimal number to 32-bit binary string using bcmath
96 * Handles large numbers that exceed PHP_INT_MAX on 32-bit systems
99 * @return string 32-bit binary representation
108 for ($i = 31; $i >= 0; $i--) {
109 $power = bcpow('2', (string)$i);