We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50fadb1 commit a0e95f8Copy full SHA for a0e95f8
CIDRmatch/CIDRmatch.php
@@ -57,7 +57,7 @@ public function match($ip, $cidr)
57
// inspired by: http://stackoverflow.com/questions/7951061/matching-ipv6-address-to-a-cidr-subnet
58
private function IPv6MaskToByteArray($subnetMask)
59
{
60
- $addr = str_repeat("f", $subnetMask / 4);
+ $addr = str_repeat("f", intdiv($subnetMask, 4));
61
switch ($subnetMask % 4) {
62
case 0:
63
break;
0 commit comments