| 2f70db90 | 04-Dec-2025 |
WillForan <willforan@gmail.com> |
fix: 32bit IP tests w/string of decimal representation, overflows
Math in PHP is hard! sprintf("%.0f",0x7FFFFFFFFFFFFFFF) == sprintf("%.0f",0x7FFFFFFFFFFFFF00)
Changes * 32bit gets own version o
fix: 32bit IP tests w/string of decimal representation, overflows
Math in PHP is hard! sprintf("%.0f",0x7FFFFFFFFFFFFFFF) == sprintf("%.0f",0x7FFFFFFFFFFFFF00)
Changes * 32bit gets own version of tests where expected values are strings * decimalToBinary32 to replace `sprintf("%032b%032b"...)`, avoids overflow * overflow check in ipv4 too * refactor * partsTo64 for 32bit parts into dec value as str (bcmath) * Ip32::$b32 as class constant * condition always PHP_INT_SIZE == 4 for 32bit (instead of == 8 for 64)
show more ...
|