Home
last modified time | relevance | path

Searched hist:"2 f70db90a6d48ecf1f6af51603dba5a630662d2a" (Results 1 – 4 of 4) sorted by relevance

/dokuwiki/_test/tests/inc/
H A DIpTest.php2f70db90a6d48ecf1f6af51603dba5a630662d2a Thu Dec 04 17:10:41 UTC 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 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)

/dokuwiki/inc/
H A DIp32.php2f70db90a6d48ecf1f6af51603dba5a630662d2a Thu Dec 04 17:10:41 UTC 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 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)

H A DIp.php2f70db90a6d48ecf1f6af51603dba5a630662d2a Thu Dec 04 17:10:41 UTC 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 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)

/dokuwiki/_test/
H A DREADME2f70db90a6d48ecf1f6af51603dba5a630662d2a Thu Dec 04 17:10:41 UTC 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 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)