Skip to content

Commit bd8dfd9

Browse files
authored
Merge pull request #28 from xefi/phone-extension
Phone extension
2 parents 7dded76 + 1df5dcc commit bd8dfd9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

content/2.extensions/phone.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Phone
3+
description: Phone extension for Xefi Faker PHP
4+
---
5+
6+
Please be aware that the base package only provide random fake phone numbers, if you want to have more specialized content please create your own formats (locales are coming soon).
7+
Format: Specify in a string the format you want, `{d}` for digit, `{l}` for letter, `{a}` for any, `{separator}` for the separator. Other characters are used as-is. For example: `{d}{d}.{d}{d}{separator}{d}{d}.{d}{d}` with a `-` as separator gives `83.52-33.10`.
8+
9+
## Phone number
10+
11+
```php
12+
$faker->phoneNumber(format: null, separator: null, prefix: null); // 70229848
13+
```
14+
15+
## Cell Phone Number
16+
17+
```php
18+
$faker->cellPhoneNumber(separator: null, prefix: null); // 5748
19+
```
20+
21+
## Landline Phone Number
22+
23+
```php
24+
$faker->landlinePhoneNumber(separator: null, prefix: null); // 70229848
25+
```
26+
27+
## Indicatored Phone Number
28+
29+
```php
30+
$faker->indicatoredPhoneNumber(separator: null); // 0070229848
31+
```
32+
33+
## Indicatored Cell Phone Number
34+
35+
```php
36+
$faker->indicatoredCellPhoneNumber(separator: null); // 007022
37+
```
38+
39+
## Indicatored Landline Phone Number
40+
41+
```php
42+
$faker->indicatoredLandlinePhoneNumber(separator: null, prefix: null); // 0070229848
43+
```

0 commit comments

Comments
 (0)