azjezz/psl
PSL is a modern, well-typed standard library for PHP 8.4+, inspired by HHVM’s HSL. It offers safer, predictable APIs for async, collections, networking, I/O, crypto, terminal UI, and robust data validation—replacing brittle built-ins with consistent alternatives.
The CIDR component provides utilities for working with CIDR (Classless Inter-Domain Routing) notation. It supports both IPv4 and IPv6 addresses.
IPv4 addresses are internally normalized to IPv4-mapped IPv6 for unified comparison, so mixed-family matching works transparently.
@example('networking/cidr-usage.php')
Block::contains() accepts either a string or an IP\Address object:
@example('networking/cidr-address.php')
@example('networking/cidr-ipv4.php')
@example('networking/cidr-ipv6.php')
@example('networking/cidr-single-host.php')
See src/Psl/CIDR/ for the full API.
How can I help you explore Laravel packages today?