sharapeco / phone-jp
Split Japanese phone number.
Installs: 2 459
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2022-11-18 03:24:36 UTC
README
The new location is https://github.com/piyo2/format-phone-jp
2022-10-18
PhoneJP
Split Japanese phone number.
Usage
use sharapeco\real\PhoneJP; // Basic PhoneJP::split('0120444444'); // => '0120-444-444' // Without zero prefix input PhoneJP::split('120444444'); // => '0120-444-444' // Without prefix output PhoneJP::split('0120444444', false); // => '120-444-444' // Set delimiter PhoneJP::split('0120444444', true, ' '); // => '0120 444 444'
Data source
- 総務省|電気通信番号制度|市外局番の一覧 (2021-10-01)