Immutable value object for IPv4 and IPv6 addresses with helper methods for ranges, subnet masks, and RFC-based type checking.
darsyn/ip is an immutable value object library for handling IPv4 and IPv6 addresses in PHP. It provides a robust, type-safe abstraction for IP address manipulation, validation, and analysis, making network programming more reliable and developer-friendly.
PHP developers working on network-related applications, such as those building web applications with IP-based access control, network monitoring tools, or systems requiring IP address validation and subnet calculations.
Developers choose darsyn/ip for its strict immutability, thread safety, and comprehensive RFC-based type checking, offering a clean, intuitive API with extensive test coverage across multiple PHP versions.
Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
IP objects are immutable, ensuring predictable behavior and thread safety in multi-threaded environments, as emphasized in the key features for reliable network programming.
Provides RFC-based type checking for private, multicast, and loopback addresses, enabling standards-compliant IP analysis directly from the library's helper methods.
Offers version-specific classes and a Multi class for handling both address families, with configurable strategies like IPv4-mapped representation, as noted in the brief example.
The library is tested across PHP versions from 7.1 to 8.4 with PHPUnit and static analysis at max level, ensuring high reliability and compatibility.
Doctrine integration requires an additional package (darsyn/ip-doctrine), adding complexity and dependency management for ORM users, as mentioned in the compatibility notes.
Compatibility is split between 5.x.x for PHP 5.6-8.3 and 6.x.x for PHP 7.1+, which can lead to confusion and require careful version selection for different environments.
Full documentation is housed in a separate docs/ folder rather than inline, potentially making it less accessible compared to integrated documentation approaches.