Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to extract CIDR netmask #7

Open
pertoft opened this issue Mar 14, 2017 · 2 comments
Open

Feature to extract CIDR netmask #7

pertoft opened this issue Mar 14, 2017 · 2 comments

Comments

@pertoft
Copy link

pertoft commented Mar 14, 2017

Thanks for the nice library. Im missing a feature to get the mask() in cidr.

Example:
$block = new IPv4Block('128.0.0.0/16');
$block->getMask() = 255.255.0.0

Wish:
$block->getMaskCIDR() = 16

@haegar
Copy link
Contributor

haegar commented Mar 14, 2017

$block->getPrefix() should do it.

@rlanvin
Copy link
Owner

rlanvin commented Mar 14, 2017

Indeed there is $block->getPrefix() for that. I need to update the documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants