Skip to content

Commit a0e95f8

Browse files
Avoid deprecated float to int conversion. (#9)
1 parent 50fadb1 commit a0e95f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CIDRmatch/CIDRmatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function match($ip, $cidr)
5757
// inspired by: http://stackoverflow.com/questions/7951061/matching-ipv6-address-to-a-cidr-subnet
5858
private function IPv6MaskToByteArray($subnetMask)
5959
{
60-
$addr = str_repeat("f", $subnetMask / 4);
60+
$addr = str_repeat("f", intdiv($subnetMask, 4));
6161
switch ($subnetMask % 4) {
6262
case 0:
6363
break;

0 commit comments

Comments
 (0)