mlocati/ip-lib
Handle IPv4, IPv6 addresses and ranges
1.22.0
7.9M downloads/mo
#1152 most downloaded on Packagist
mlocati/ip-lib
What this package is like to depend on
Last release 10 months ago
15 Oct 2025
Ships unpredictably
gaps range from 2 weeks to 2.8 years
Some releases are documented
notes for 10 of 27 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
27 releases · first in 2016
2 releases in the last 12 months
see the full history below
Release timeline
27 releases · Mar 2016 to Oct 2025Releases
latest 27-
1.22.015 Oct 2025Release notes
Open source →What's Changed
- Add PHPStan checks by @mlocati in #108
- Add Factory::getRangeFromAddresses() by @mlocati in #109
- Run test with PHP 8.5 by @mlocati in #110
Full Changelog: 1.21.0...1.22.0
-
1.21.024 Sep 2025Release notes
Open source →What's Changed
- Minor fix in IPv6::add() by @mlocati in #97
- Document IPv4 "long" format by @mlocati in #104
- Add getExactSize() to ranges by @mlocati in #105
- Let getAddressAtOffset() accept numeric strings by @mlocati in #106
Full Changelog: 1.20.0...1.21.0
-
1.20.004 Feb 2025Release notes
Open source →What's Changed
- Add AddressInterface::shift() by @mlocati in #94
- Add AddressInterface::add() by @mlocati in #95
- Don't throw an OverflowException in RangeInterface::split() by @mlocati in #96
Full Changelog: 1.19.0...1.20.0
-
1.19.004 Feb 2025Release notes
Open source →What's Changed
- Add
splitmethod to IP ranges (#93, @alissn @mlocati) getNetworkPrefixis now available for all implementations of IP ranges (#93, @mlocati)
New Contributors
Full Changelog: 1.18.1...1.19.0
- Add
-
1.18.129 Oct 2024 -
1.18.013 Jan 2022 -
1.17.110 Nov 2021 -
1.17.003 Aug 2021Release notes
Open source →New features
- added support for not quad-dotted IPv4 addresses
- added support for IPv4 ranges compact form
Deprecated functions
In order to support parsing the above notations, some new functions have been introduced, which deprecate some of the methods that parse strings.
Deprecated function New function IPLib\Factory::addressFromStringIPLib\Factory::parseAddressStringIPLib\Factory::rangeFromStringIPLib\Factory::parseRangeStringIPLib\Factory::rangeFromBoundariesIPLib\Factory::getRangeFromBoundariesIPLib\Factory::rangesFromBoundariesIPLib\Factory::getRangesFromBoundariesIPLib\Address\IPv4::fromStringIPLib\Address\IPv4::parseStringIPLib\Address\IPv6::fromStringIPLib\Address\IPv6::parseStringIPLib\Range\Pattern::fromStringIPLib\Range\Pattern::parseStringIPLib\Range\Single::fromStringIPLib\Range\Single::parseStringIPLib\Range\Subnet::fromStringIPLib\Range\Subnet::parseStringSee the phpdoc of the deprecated methods for further details.
Special thanks to @elrido for his productive contributions.
-
1.16.031 May 2021 -
1.15.026 May 2021Release notes
Open source →- Fix typo in
RangesFromBoundaryCalculatorclass (thanks @lucascherifi) - New method for addresses and ranges:
getAddressAtOffset()(thanks @ernix) - Fixed end address of ranges calculated by
rangesFromBoundaries()(thanks @crucifyer)
- Fix typo in
-
1.14.031 Dec 2020Nothing published for this version
-
1.13.004 Oct 2020Nothing published for this version
-
1.12.027 Jul 2020Nothing published for this version
-
1.11.016 Jul 2020Nothing published for this version
-
1.10.009 Jul 2020Nothing published for this version
-
1.9.020 Sep 2019Nothing published for this version
-
1.8.030 Jul 2019Nothing published for this version
-
1.7.025 Feb 2019Nothing published for this version
-
1.6.012 Aug 2018Nothing published for this version
-
1.5.018 Dec 2017Nothing published for this version
-
1.4.030 Aug 2017Nothing published for this version
-
1.3.006 Jul 2017Nothing published for this version
-
1.2.114 Mar 2017Nothing published for this version
-
1.2.015 Feb 2017Nothing published for this version
-
1.1.115 Feb 2017Nothing published for this version
-
1.1.002 Feb 2017Nothing published for this version
-
1.0.018 Mar 2016Nothing published for this version