A PHP library for parsing, formatting, validating, and geocoding international phone numbers, based on Google's libphonenumber.
libphonenumber-for-php is a PHP library for parsing, formatting, validating, and geolocating international phone numbers. It is a comprehensive port of Google's libphonenumber, enabling consistent and reliable handling of phone numbers across PHP applications. The library solves the problem of managing phone numbers in various international formats by providing robust tools for standardization and verification.
PHP developers building applications that require international phone number handling, such as e-commerce platforms, user authentication systems, contact management software, and telecommunication services. It is also suitable for system integrators and backend engineers working on data validation and normalization pipelines.
Developers choose this library because it maintains feature parity with Google's widely trusted libphonenumber, ensuring accuracy and reliability. Its unique selling point is offering a complete, production-ready PHP solution with advanced capabilities like geocoding, carrier mapping, and time zone mapping, which are often missing in simpler alternatives.
PHP version of Google's phone number handling library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes parsing, formatting, validation, geocoding, carrier mapping, time zone mapping, and short number handling, as listed in the README's key features, making it a one-stop solution.
Faithfully ports Google's libphonenumber, ensuring high accuracy and consistency, with the README emphasizing feature parity and referring to Google's demo for validation.
Provides detailed documentation links and quick examples in the README, such as for Swiss number parsing and formatting, easing implementation.
Shows continuous integration, test coverage, and regular updates aligned with Google's releases, indicating reliable long-term support.
Only supports PHP 8.1 and above, excluding projects on older LTS versions like PHP 7.4, which are still widely used in legacy systems.
Follows Google's versioning instead of Semantic Versioning, as noted in the README, leading to potential unexpected breaking changes in major versions.
The full library includes extensive metadata for advanced features like geocoding, resulting in a larger footprint; the lite version is a separate package for core functionality only.