Skip to content

Faker Person Phone Formatted

The faker::person_phone_formatted function generates a random phone number with varying formatting styles.

Syntax

faker::person_phone_formatted()

Parameters

  • None: This function does not require any parameters.

Returns

  • String: A random formatted phone number.

Example

Try it out below!
faker::person_phone_formatted()

This function is useful for generating test data or simulating user input with realistic phone number formats.