proficlos / phonenumber
Czech PhoneNumber validator & parser
Installs: 19 364
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-11-29 04:36:08 UTC
README
PhoneNumber validator & parser (CZ & SK & ...)
Install with composer
$ composer require proficlos/phonenumber
How to use
use ProfiCloS\Tools\PhoneNumber; // validation PhoneNumber::isPhone('+420777666555'); // true PhoneNumber::isPhone('777666555'); // true PhoneNumber::isPhone('77766655'); // false // parser $phone = PhoneNumber::from('+420777666555'); $phone->setFormat( PhoneNumber::FORMAT_INTERNATIONAL ); echo $phone; // 00420777666555 $phone->setFormat( PhoneNumber::FORMAT_GSM ); echo $phone; // +420777666555 $phone->setFormat( PhoneNumber::FORMAT_CANONICAL ); echo $phone; // +420 777 666 555
Buy us a coffee <3
Donate us <3
ETH: 0x7D771A56735500f76af15F589155BDC91613D4aB
UBIQ: 0xAC08C7B9F06EFb42a603d7222c359e0fF54e0a13