|
@@ 121-126 (lines=6) @@
|
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
// x64, bcmath |
| 121 |
|
if (function_exists('bcmul')) { |
| 122 |
|
$h = bcdiv($value, 4294967296, 0); |
| 123 |
|
$l = bcmod($value, 4294967296); |
| 124 |
|
return pack('NN', $h, $l); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
// x64, no-bcmath |
| 128 |
|
$p = max(0, strlen($value) - 13); |
| 129 |
|
$lo = (int)substr($value, $p); |
|
@@ 145-150 (lines=6) @@
|
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
// x32, bcmath |
| 145 |
|
if (function_exists('bcmul')) { |
| 146 |
|
$h = bcdiv($value, '4294967296', 0); |
| 147 |
|
$l = bcmod($value, '4294967296'); |
| 148 |
|
return pack('NN', (float)$h, (float)$l); // conversion to float is intentional; int would lose 31st bit |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
// x32, no-bcmath |
| 152 |
|
$p = max(0, strlen($value) - 13); |
| 153 |
|
$lo = (float)substr($value, $p); |