Skip to content

Faker Person Phone

The faker::person_phone function generates a random phone number.

Syntax

faker::person_phone()

Parameters

  • None: This function does not require any parameters.

Returns

  • String: A random phone number.

Example

Try it out below!
faker::person_phone()

This function is useful for generating contact-related test data or simulating user input.