PHP code example of zipavlin / phony
1. Go to this page and download the library: Download zipavlin/phony library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zipavlin / phony example snippets
use Zipavlin\Phony;
$phony = new Phony()
echo $phony->from('041 123-456')->toDisplay(); // +386 (0)41 123 456
echo $phony->from('041 123 456')->toFormat('00386 0{area}/{number:2}-{number:2}-{number}'); // 00386 041/12-34-56
echo $phony->from('01 1234-567')->toDisplay(); // +386 (0)1 12 34 567