Documentation

Generator
in package

Table of Contents

$address  : string
$amPm  : string
$asciify  : string
$biasedNumberBetween  : int
$boolean  : bool
$bothify  : string
$buildingNumber  : string
$century  : string
$chrome  : string
$city  : string
$citySuffix  : string
$colorName  : string
$company  : string
$companyEmail  : string
$companySuffix  : string
$country  : string
$countryCode  : string
$countryISOAlpha3  : string
$creditCardDetails  : array<string|int, mixed>
$creditCardExpirationDate  : DateTime
$creditCardExpirationDateString  : string
$creditCardNumber  : string
$creditCardType  : string
$currencyCode  : string
$date  : string
$dateTime  : DateTime
$dateTimeAD  : DateTime
$dateTimeBetween  : DateTime
$dateTimeInInterval  : DateTime
$dateTimeThisCentury  : DateTime
$dateTimeThisDecade  : DateTime
$dateTimeThisMonth  : DateTime
$dateTimeThisYear  : DateTime
$dayOfMonth  : string
$dayOfWeek  : string
$domainName  : string
$domainWord  : string
$e164PhoneNumber  : string
$email  : string
$emoji  : string
$file  : string
$firefox  : string
$firstName  : string
$firstNameFemale  : string
$firstNameMale  : string
$freeEmail  : string
$freeEmailDomain  : string
$getDefaultTimezone  : string
$hexColor  : string
$hslColor  : string
$hslColorAsArray  : array<string|int, mixed>
$iban  : string
$image  : string
$imageUrl  : string
$imei  : int
$internetExplorer  : string
$ipv4  : string
$ipv6  : string
$iso8601  : string
$jobTitle  : string
$languageCode  : string
$lastName  : string
$latitude  : float
$lexify  : string
$linuxPlatformToken  : string
$linuxProcessor  : string
$localCoordinates  : array<string|int, float>
$locale  : string
$localIpv4  : string
$longitude  : float
$macAddress  : string
$macPlatformToken  : string
$macProcessor  : string
$md5  : string
$month  : string
$monthName  : string
$name  : string
$numerify  : string
$opera  : string
$optional  : mixed
$paragraph  : string
$paragraphs  : array<string|int, mixed>|string
$passthrough  : mixed
$password  : string
$phoneNumber  : string
$postcode  : string
$randomAscii  : string
$randomDigitNotNull  : int
$randomElement  : mixed
$randomElements  : array<string|int, mixed>
$randomHtml  : string
$randomKey  : int|string|null
$randomLetter  : string
$realText  : string
$realTextBetween  : string
$regexify  : string
$rgbaCssColor  : string
$rgbColor  : string
$rgbColorAsArray  : array<string|int, mixed>
$rgbCssColor  : string
$safari  : string
$safeColorName  : string
$safeEmail  : string
$safeEmailDomain  : string
$safeHexColor  : string
$sentence  : string
$sentences  : array<string|int, mixed>|string
$setDefaultTimezone  : void
$sha1  : string
$sha256  : string
$shuffle  : array<string|int, mixed>|string
$shuffleArray  : array<string|int, mixed>
$shuffleString  : string
$slug  : string
$streetAddress  : string
$streetName  : string
$streetSuffix  : string
$swiftBicNumber  : string
$text  : string
$time  : string
$timezone  : string
$title  : string
$titleFemale  : string
$titleMale  : string
$tld  : string
$toLower  : string
$toUpper  : string
$unique  : UniqueGenerator
$unixTime  : int
$url  : string
$userAgent  : string
$userName  : string
$uuid  : string
$valid  : ValidGenerator
$windowsPlatformToken  : string
$word  : string
$words  : array<string|int, mixed>|string
$year  : string
$formatters  : mixed
$providers  : mixed
$container  : mixed
__call()  : mixed
__construct()  : mixed
__destruct()  : mixed
__get()  : mixed
__wakeup()  : mixed
addProvider()  : mixed
address()  :
amPm()  :
asciify()  :
biasedNumberBetween()  :
bloodGroup()  : string
Get a full blood group
bloodRh()  : string
Get a random resis value
bloodType()  : string
Get an actual blood type
boolean()  :
bothify()  :
buildingNumber()  :
century()  :
chrome()  :
city()  :
citySuffix()  :
colorName()  :
company()  :
companyEmail()  :
companySuffix()  :
country()  :
countryCode()  :
countryISOAlpha3()  :
creditCardDetails()  :
creditCardExpirationDate()  :
creditCardExpirationDateString()  :
creditCardNumber()  :
creditCardType()  :
currencyCode()  :
date()  :
dateTime()  :
dateTimeAD()  :
dateTimeBetween()  :
dateTimeInInterval()  :
dateTimeThisCentury()  :
dateTimeThisDecade()  :
dateTimeThisMonth()  :
dateTimeThisYear()  :
dayOfMonth()  :
dayOfWeek()  :
domainName()  :
domainWord()  :
e164PhoneNumber()  :
ean13()  : string
Get a random EAN13 barcode.
ean8()  : string
Get a random EAN8 barcode.
email()  :
emoji()  :
ext()  : T
file()  :
fileExtension()  : mixed
Get a random file extension (without a dot)
filePath()  : mixed
Get a full path to a new real file on the system.
firefox()  :
firstName()  :
firstNameFemale()  :
firstNameMale()  :
format()  : mixed
freeEmail()  :
freeEmailDomain()  :
getDefaultTimezone()  :
getFormatter()  : callable
getProviders()  : mixed
hexColor()  :
hslColor()  :
hslColorAsArray()  :
iban()  :
image()  :
imageUrl()  :
imei()  :
internetExplorer()  :
ipv4()  :
ipv6()  :
isbn10()  : string
Get a random ISBN-10 code
isbn13()  : string
Get a random ISBN-13 code
iso8601()  :
jobTitle()  :
languageCode()  :
lastName()  :
latitude()  :
lexify()  :
linuxPlatformToken()  :
linuxProcessor()  :
localCoordinates()  :
locale()  :
localIpv4()  :
longitude()  :
macAddress()  :
macPlatformToken()  :
macProcessor()  :
md5()  :
mimeType()  : mixed
Get a random MIME type
month()  :
monthName()  :
name()  :
numberBetween()  : int
Returns a random number between $int1 and $int2 (any order)
numerify()  :
opera()  :
optional()  :
paragraph()  :
paragraphs()  :
parse()  : string
Replaces tokens ('{{ tokenName }}') with the result from the token method call
passthrough()  :
password()  :
phoneNumber()  :
postcode()  :
randomAscii()  :
randomDigit()  : int
Returns a random number between 0 and 9
randomDigitNot()  : int
Generates a random digit, which cannot be $except
randomDigitNotNull()  :
randomDigitNotZero()  : int
Returns a random number between 1 and 9
randomFloat()  : float
Return a random float number
randomHtml()  :
randomKey()  :
randomLetter()  :
randomNumber()  : int
Returns a random integer with 0 to $nbDigits digits.
realText()  :
realTextBetween()  :
regexify()  :
rgbaCssColor()  :
rgbColor()  :
rgbColorAsArray()  :
rgbCssColor()  :
safari()  :
safeColorName()  :
safeEmail()  :
safeEmailDomain()  :
safeHexColor()  :
seed()  : mixed
semver()  : string
Get a version number in semantic versioning syntax 2.0.0. (https://semver.org/spec/v2.0.0.html)
sentence()  :
sentences()  :
setDefaultTimezone()  :
sha1()  :
sha256()  :
shuffle()  :
shuffleArray()  :
shuffleString()  :
slug()  :
streetAddress()  :
streetName()  :
streetSuffix()  :
swiftBicNumber()  :
text()  :
time()  :
timezone()  :
title()  :
titleFemale()  :
titleMale()  :
tld()  :
toLower()  :
toUpper()  :
unique()  :
unixTime()  :
url()  :
userAgent()  :
userName()  :
uuid()  :
valid()  :
windowsPlatformToken()  :
word()  :
words()  :
year()  :
callFormatWithMatches()  : mixed

Properties

$biasedNumberBetween

public int $biasedNumberBetween

$buildingNumber

public string $buildingNumber

$countryISOAlpha3

public string $countryISOAlpha3

$creditCardDetails

public array<string|int, mixed> $creditCardDetails

$creditCardExpirationDate

public DateTime $creditCardExpirationDate

$creditCardExpirationDateString

public string $creditCardExpirationDateString

$creditCardNumber

public string $creditCardNumber

$creditCardType

public string $creditCardType

$dateTimeBetween

public DateTime $dateTimeBetween

$dateTimeInInterval

public DateTime $dateTimeInInterval

$dateTimeThisCentury

public DateTime $dateTimeThisCentury

$dateTimeThisDecade

public DateTime $dateTimeThisDecade

$dateTimeThisMonth

public DateTime $dateTimeThisMonth

$dateTimeThisYear

public DateTime $dateTimeThisYear

$e164PhoneNumber

public string $e164PhoneNumber

$firstNameFemale

public string $firstNameFemale

$freeEmailDomain

public string $freeEmailDomain

$getDefaultTimezone

public string $getDefaultTimezone

$hslColorAsArray

public array<string|int, mixed> $hslColorAsArray

$internetExplorer

public string $internetExplorer

$linuxPlatformToken

public string $linuxPlatformToken

$linuxProcessor

public string $linuxProcessor

$localCoordinates

public array<string|int, float> $localCoordinates

$macPlatformToken

public string $macPlatformToken

$paragraphs

public array<string|int, mixed>|string $paragraphs

$randomDigitNotNull

public int $randomDigitNotNull

$randomElements

public array<string|int, mixed> $randomElements

$realTextBetween

public string $realTextBetween

$rgbColorAsArray

public array<string|int, mixed> $rgbColorAsArray

$safeEmailDomain

public string $safeEmailDomain

$sentences

public array<string|int, mixed>|string $sentences

$setDefaultTimezone

public void $setDefaultTimezone

$shuffle

public array<string|int, mixed>|string $shuffle

$shuffleArray

public array<string|int, mixed> $shuffleArray

$swiftBicNumber

public string $swiftBicNumber

$windowsPlatformToken

public string $windowsPlatformToken

$words

public array<string|int, mixed>|string $words

$formatters

protected mixed $formatters = []

Methods

__call()

public __call(string $method, array<string|int, mixed> $attributes) : mixed
Parameters
$method : string
$attributes : array<string|int, mixed>
Return values
mixed

__destruct()

public __destruct() : mixed
Return values
mixed

__get()

public __get(string $attribute) : mixed
Parameters
$attribute : string
Tags
deprecated

Use a method instead.

Return values
mixed

__wakeup()

public __wakeup() : mixed
Return values
mixed

addProvider()

public addProvider(mixed $provider) : mixed
Parameters
$provider : mixed
Return values
mixed

address()

public address() :
Return values

amPm()

public amPm(mixed $max) :
Parameters
$max : mixed
Return values

asciify()

public asciify(mixed $string) :
Parameters
$string : mixed
Return values

biasedNumberBetween()

public biasedNumberBetween(mixed $min, mixed $max, mixed $function) :
Parameters
$min : mixed
$max : mixed
$function : mixed
Return values

bloodGroup()

Get a full blood group

public bloodGroup() : string
Tags
example

'AB+'

Return values
string

bloodRh()

Get a random resis value

public bloodRh() : string
Tags
example

'+'

Return values
string

bloodType()

Get an actual blood type

public bloodType() : string
Tags
example

'AB'

Return values
string

boolean()

public boolean(mixed $chanceOfGettingTrue) :
Parameters
$chanceOfGettingTrue : mixed
Return values

bothify()

public bothify(mixed $string) :
Parameters
$string : mixed
Return values

buildingNumber()

public buildingNumber() :
Return values

century()

public century() :
Return values

citySuffix()

public citySuffix() :
Return values

colorName()

public colorName() :
Return values

company()

public company() :
Return values

companyEmail()

public companyEmail() :
Return values

companySuffix()

public companySuffix() :
Return values

country()

public country() :
Return values

countryCode()

public countryCode() :
Return values

countryISOAlpha3()

public countryISOAlpha3() :
Return values

creditCardDetails()

public creditCardDetails(mixed $valid) :
Parameters
$valid : mixed
Return values

creditCardExpirationDate()

public creditCardExpirationDate(mixed $valid) :
Parameters
$valid : mixed
Return values

creditCardExpirationDateString()

public creditCardExpirationDateString(mixed $valid, mixed $expirationDateFormat) :
Parameters
$valid : mixed
$expirationDateFormat : mixed
Return values

creditCardNumber()

public creditCardNumber(mixed $type, mixed $formatted, mixed $separator) :
Parameters
$type : mixed
$formatted : mixed
$separator : mixed
Return values

creditCardType()

public creditCardType() :
Return values

currencyCode()

public currencyCode() :
Return values

date()

public date(mixed $format, mixed $max) :
Parameters
$format : mixed
$max : mixed
Return values

dateTime()

public dateTime(mixed $max, mixed $timezone) :
Parameters
$max : mixed
$timezone : mixed
Return values

dateTimeAD()

public dateTimeAD(mixed $max, mixed $timezone) :
Parameters
$max : mixed
$timezone : mixed
Return values

dateTimeBetween()

public dateTimeBetween(mixed $startDate, mixed $endDate, mixed $timezone) :
Parameters
$startDate : mixed
$endDate : mixed
$timezone : mixed
Return values

dateTimeInInterval()

public dateTimeInInterval(mixed $date, mixed $interval, mixed $timezone) :
Parameters
$date : mixed
$interval : mixed
$timezone : mixed
Return values

dateTimeThisCentury()

public dateTimeThisCentury(mixed $max, mixed $timezone) :
Parameters
$max : mixed
$timezone : mixed
Return values

dateTimeThisDecade()

public dateTimeThisDecade(mixed $max, mixed $timezone) :
Parameters
$max : mixed
$timezone : mixed
Return values

dateTimeThisMonth()

public dateTimeThisMonth(mixed $max, mixed $timezone) :
Parameters
$max : mixed
$timezone : mixed
Return values

dateTimeThisYear()

public dateTimeThisYear(mixed $max, mixed $timezone) :
Parameters
$max : mixed
$timezone : mixed
Return values

dayOfMonth()

public dayOfMonth(mixed $max) :
Parameters
$max : mixed
Return values

dayOfWeek()

public dayOfWeek(mixed $max) :
Parameters
$max : mixed
Return values

domainName()

public domainName() :
Return values

domainWord()

public domainWord() :
Return values

e164PhoneNumber()

public e164PhoneNumber() :
Return values

ean13()

Get a random EAN13 barcode.

public ean13() : string
Tags
example

'4006381333931'

Return values
string

ean8()

Get a random EAN8 barcode.

public ean8() : string
Tags
example

'73513537'

Return values
string

file()

public file(mixed $sourceDirectory, mixed $targetDirectory, mixed $fullPath) :
Parameters
$sourceDirectory : mixed
$targetDirectory : mixed
$fullPath : mixed
Return values

fileExtension()

Get a random file extension (without a dot)

public fileExtension() : mixed
Tags
example

avi

Return values
mixed

filePath()

Get a full path to a new real file on the system.

public filePath() : mixed
Return values
mixed

firefox()

public firefox() :
Return values

firstName()

public firstName(mixed $gender) :
Parameters
$gender : mixed
Return values

firstNameFemale()

public firstNameFemale() :
Return values

firstNameMale()

public firstNameMale() :
Return values

format()

public format(mixed $format[, mixed $arguments = [] ]) : mixed
Parameters
$format : mixed
$arguments : mixed = []
Return values
mixed

freeEmail()

public freeEmail() :
Return values

freeEmailDomain()

public freeEmailDomain() :
Return values

getDefaultTimezone()

public getDefaultTimezone() :
Return values

getFormatter()

public getFormatter(string $format) : callable
Parameters
$format : string
Return values
callable

getProviders()

public getProviders() : mixed
Return values
mixed

hexColor()

public hexColor() :
Return values

hslColor()

public hslColor() :
Return values

hslColorAsArray()

public hslColorAsArray() :
Return values

iban()

public iban(mixed $countryCode, mixed $prefix, mixed $length) :
Parameters
$countryCode : mixed
$prefix : mixed
$length : mixed
Return values

image()

public image(mixed $dir, mixed $width, mixed $height, mixed $category, mixed $fullPath, mixed $randomize, mixed $word, mixed $gray) :
Parameters
$dir : mixed
$width : mixed
$height : mixed
$category : mixed
$fullPath : mixed
$randomize : mixed
$word : mixed
$gray : mixed
Return values

imageUrl()

public imageUrl(mixed $width, mixed $height, mixed $category, mixed $randomize, mixed $word, mixed $gray) :
Parameters
$width : mixed
$height : mixed
$category : mixed
$randomize : mixed
$word : mixed
$gray : mixed
Return values

internetExplorer()

public internetExplorer() :
Return values

iso8601()

public iso8601(mixed $max) :
Parameters
$max : mixed
Return values

jobTitle()

public jobTitle() :
Return values

languageCode()

public languageCode() :
Return values

lastName()

public lastName() :
Return values

latitude()

public latitude(mixed $min, mixed $max) :
Parameters
$min : mixed
$max : mixed
Return values

lexify()

public lexify(mixed $string) :
Parameters
$string : mixed
Return values

linuxPlatformToken()

public linuxPlatformToken() :
Return values

linuxProcessor()

public linuxProcessor() :
Return values

localCoordinates()

public localCoordinates() :
Return values

localIpv4()

public localIpv4() :
Return values

longitude()

public longitude(mixed $min, mixed $max) :
Parameters
$min : mixed
$max : mixed
Return values

macAddress()

public macAddress() :
Return values

macPlatformToken()

public macPlatformToken() :
Return values

macProcessor()

public macProcessor() :
Return values

mimeType()

Get a random MIME type

public mimeType() : mixed
Tags
example

'video/avi'

Return values
mixed

month()

public month(mixed $max) :
Parameters
$max : mixed
Return values

monthName()

public monthName(mixed $max) :
Parameters
$max : mixed
Return values

name()

public name(mixed $gender) :
Parameters
$gender : mixed
Return values

numberBetween()

Returns a random number between $int1 and $int2 (any order)

public numberBetween(mixed $int1[, mixed $int2 = 2147483647 ]) : int
Parameters
$int1 : mixed
$int2 : mixed = 2147483647
Tags
example

79907610

Return values
int

numerify()

public numerify(mixed $string) :
Parameters
$string : mixed
Return values

optional()

public optional(mixed $weight, mixed $default) :
Parameters
$weight : mixed
$default : mixed
Return values

paragraph()

public paragraph(mixed $nbSentences, mixed $variableNbSentences) :
Parameters
$nbSentences : mixed
$variableNbSentences : mixed
Return values

paragraphs()

public paragraphs(mixed $nb, mixed $asText) :
Parameters
$nb : mixed
$asText : mixed
Return values

parse()

Replaces tokens ('{{ tokenName }}') with the result from the token method call

public parse(string $string) : string
Parameters
$string : string

String that needs to bet parsed

Return values
string

passthrough()

public passthrough(mixed $value) :
Parameters
$value : mixed
Return values

password()

public password(mixed $minLength, mixed $maxLength) :
Parameters
$minLength : mixed
$maxLength : mixed
Return values

phoneNumber()

public phoneNumber() :
Return values

postcode()

public postcode() :
Return values

randomAscii()

public randomAscii() :
Return values

randomDigit()

Returns a random number between 0 and 9

public randomDigit() : int
Return values
int

randomDigitNot()

Generates a random digit, which cannot be $except

public randomDigitNot(mixed $except) : int
Parameters
$except : mixed
Return values
int

randomDigitNotNull()

public randomDigitNotNull() :
Return values

randomDigitNotZero()

Returns a random number between 1 and 9

public randomDigitNotZero() : int
Return values
int

randomFloat()

Return a random float number

public randomFloat([mixed $nbMaxDecimals = null ], mixed $min[, mixed $max = null ]) : float
Parameters
$nbMaxDecimals : mixed = null
$min : mixed
$max : mixed = null
Tags
example

48.8932

Return values
float

randomHtml()

public randomHtml(mixed $maxDepth, mixed $maxWidth) :
Parameters
$maxDepth : mixed
$maxWidth : mixed
Return values

randomKey()

public randomKey(mixed $array) :
Parameters
$array : mixed
Return values

randomLetter()

public randomLetter() :
Return values

randomNumber()

Returns a random integer with 0 to $nbDigits digits.

public randomNumber([int|null $nbDigits = null ][, bool $strict = false ]) : int

The maximum value returned is mt_getrandmax()

Parameters
$nbDigits : int|null = null

Defaults to a random number between 1 and 9

$strict : bool = false

Whether the returned number should have exactly $nbDigits

Tags
example

79907610

Return values
int

realText()

public realText(mixed $maxNbChars, mixed $indexSize) :
Parameters
$maxNbChars : mixed
$indexSize : mixed
Return values

realTextBetween()

public realTextBetween(mixed $minNbChars, mixed $maxNbChars, mixed $indexSize) :
Parameters
$minNbChars : mixed
$maxNbChars : mixed
$indexSize : mixed
Return values

regexify()

public regexify(mixed $regex) :
Parameters
$regex : mixed
Return values

rgbaCssColor()

public rgbaCssColor() :
Return values

rgbColor()

public rgbColor() :
Return values

rgbColorAsArray()

public rgbColorAsArray() :
Return values

rgbCssColor()

public rgbCssColor() :
Return values

safeColorName()

public safeColorName() :
Return values

safeEmail()

public safeEmail() :
Return values

safeEmailDomain()

public safeEmailDomain() :
Return values

safeHexColor()

public safeHexColor() :
Return values

seed()

public seed([mixed $seed = null ]) : mixed
Parameters
$seed : mixed = null
Return values
mixed

semver()

Get a version number in semantic versioning syntax 2.0.0. (https://semver.org/spec/v2.0.0.html)

public semver([bool $preRelease = false ][, bool $build = false ]) : string
Parameters
$preRelease : bool = false

Pre release parts may be randomly included

$build : bool = false

Build parts may be randomly included

Tags
example

1.0.0

example

1.0.0-alpha.1

example

1.0.0-alpha.1+b71f04d

Return values
string

sentence()

public sentence(mixed $nbWords, mixed $variableNbWords) :
Parameters
$nbWords : mixed
$variableNbWords : mixed
Return values

sentences()

public sentences(mixed $nb, mixed $asText) :
Parameters
$nb : mixed
$asText : mixed
Return values

setDefaultTimezone()

public setDefaultTimezone(mixed $timezone) :
Parameters
$timezone : mixed
Return values

shuffle()

public shuffle(mixed $arg) :
Parameters
$arg : mixed
Return values

shuffleArray()

public shuffleArray(mixed $array) :
Parameters
$array : mixed
Return values

shuffleString()

public shuffleString(mixed $string, mixed $encoding) :
Parameters
$string : mixed
$encoding : mixed
Return values

slug()

public slug(mixed $nbWords, mixed $variableNbWords) :
Parameters
$nbWords : mixed
$variableNbWords : mixed
Return values

streetAddress()

public streetAddress() :
Return values

streetName()

public streetName() :
Return values

streetSuffix()

public streetSuffix() :
Return values

swiftBicNumber()

public swiftBicNumber() :
Return values

text()

public text(mixed $maxNbChars) :
Parameters
$maxNbChars : mixed
Return values

time()

public time(mixed $format, mixed $max) :
Parameters
$format : mixed
$max : mixed
Return values

timezone()

public timezone() :
Return values

title()

public title(mixed $gender) :
Parameters
$gender : mixed
Return values

titleFemale()

public titleFemale() :
Return values

titleMale()

public titleMale() :
Return values

toLower()

public toLower(mixed $string) :
Parameters
$string : mixed
Return values

toUpper()

public toUpper(mixed $string) :
Parameters
$string : mixed
Return values

unique()

public unique(mixed $reset, mixed $maxRetries) :
Parameters
$reset : mixed
$maxRetries : mixed
Return values

unixTime()

public unixTime(mixed $max) :
Parameters
$max : mixed
Return values

userAgent()

public userAgent() :
Return values

userName()

public userName() :
Return values

valid()

public valid(mixed $validator, mixed $maxRetries) :
Parameters
$validator : mixed
$maxRetries : mixed
Return values

windowsPlatformToken()

public windowsPlatformToken() :
Return values

words()

public words(mixed $nb, mixed $asText) :
Parameters
$nb : mixed
$asText : mixed
Return values

year()

public year(mixed $max) :
Parameters
$max : mixed
Return values

callFormatWithMatches()

protected callFormatWithMatches(mixed $matches) : mixed
Parameters
$matches : mixed
Tags
deprecated
Return values
mixed

Search results