php-ip icon indicating copy to clipboard operation
php-ip copied to clipboard

IPBlock not working correctly with prefix larger than 23

Open jeroenborst opened this issue 2 years ago • 0 comments

Unexpected behaviour while using IPBlock with prefixes larger than 23

$block = IPBlock::create('35.35.32.0/22');
foreach ($block as $ip) {
    echo $ip,"\n";
}
35.35.32.0
35.35.32.1
35.35.32.2
...
35.35.35.230
35.35.35.231
84.83.80.48
84.83.80.49
85.83.84.54
85.83.84.55

jeroenborst avatar Oct 03 '22 12:10 jeroenborst