app_date()
Produce datetime string based on app timezone
app_date(string $format[, int|null $timestamp = null ][, string $env = 'APP_TIMEZONE' ][, mixed $envDefault = null ]) : string|null
Parameters
-
$format
: string
-
-
$timestamp
: int|null
= null
-
-
$env
: string
= 'APP_TIMEZONE'
-
-
$envDefault
: mixed
= null
-
Return values
string|null
str_slug()
Convert the string into an SEO-friendly slug.
str_slug(string $string[, string $separator = '-' ]) : string
Parameters
-
$string
: string
-
-
$separator
: string
= '-'
-
str_random()
Generate a random string of a predefined length.
str_random(int $length[, int $case = Str::MIXEDCASE ]) : string
Parameters
-
$length
: int
-
-
$case
: int
= Str::MIXEDCASE
-
str_random_alpha()
Generate a random alphabetical string of a predefined length.
str_random_alpha(int $length[, int $case = Str::MIXEDCASE ]) : string
Parameters
-
$length
: int
-
-
$case
: int
= Str::MIXEDCASE
-
str_random_num()
Generate a random numeric string of a predefined length.
str_random_num(int $length) : string
Parameters
-
$length
: int
-
str_random_alphanum()
Generate a random alphanumeric string of a predefined length.
str_random_alphanum(int $length[, int $case = Str::MIXEDCASE ]) : string
Parameters
-
$length
: int
-
-
$case
: int
= Str::MIXEDCASE
-
str_from_camel()
Convert a camelCase string using the $separator value passed
str_from_camel(string $string[, string|null $separator = '-' ][, bool $preserveCase = false ]) : string
Parameters
-
$string
: string
-
-
$separator
: string|null
= '-'
-
-
$preserveCase
: bool
= false
-
str_to_camel()
Convert a camelCase string using the $separator value passed
str_to_camel(string $string) : string
Parameters
-
$string
: string
-
str_title_case()
Convert a string to title case
str_title_case(string $string) : string
Parameters
-
$string
: string
-
str_snake_case()
Convert a string to snake case
str_snake_case(string $string[, bool $preserveCase = false ]) : string
Parameters
-
$string
: string
-
-
$preserveCase
: bool
= false
-
str_kebab_case()
Convert a string to snake case
str_kebab_case(string $string[, bool $preserveCase = false ]) : string
Parameters
-
$string
: string
-
-
$preserveCase
: bool
= false
-
array_collapse()
Collapse an array of arrays
array_collapse(array<string|int, mixed>|AbstractArray $array) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
Return values
array<string|int, mixed>
array_flatten()
Flatten a multi-dimensional array
array_flatten(array<string|int, mixed>|AbstractArray $array[, int|float $depth = INF ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$depth
: int|float
= INF
-
Return values
array<string|int, mixed>
array_divide()
Divide the array in an array of keys and values
array_divide(array<string|int, mixed>|AbstractArray $array) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
Return values
array<string|int, mixed>
array_join()
Join the array values into a string
array_join(array<string|int, mixed>|AbstractArray $array, string $glue[, string $finalGlue = '' ]) : string
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$glue
: string
-
-
$finalGlue
: string
= ''
-
array_prepend()
Prepend value to the array
array_prepend(array<string|int, mixed>|AbstractArray $array, mixed $value[, mixed $key = null ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$value
: mixed
-
-
$key
: mixed
= null
-
Return values
array<string|int, mixed>
array_pull()
Pull value from the array and remove it
array_pull(array<string|int, mixed> &$array, mixed $key) : mixed
Parameters
-
$array
: array<string|int, mixed>
-
-
$key
: mixed
-
array_sort()
Sort array
array_sort(array<string|int, mixed>|AbstractArray $array[, int $flags = SORT_REGULAR ][, bool $assoc = true ][, bool $descending = false ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$flags
: int
= SORT_REGULAR
-
-
$assoc
: bool
= true
-
-
$descending
: bool
= false
-
Return values
array<string|int, mixed>
array_sort_desc()
Sort array descending
array_sort_desc(array<string|int, mixed>|AbstractArray $array[, int $flags = SORT_REGULAR ][, bool $assoc = true ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$flags
: int
= SORT_REGULAR
-
-
$assoc
: bool
= true
-
Return values
array<string|int, mixed>
array_ksort()
Sort array by keys
array_ksort(array<string|int, mixed>|AbstractArray $array[, int $flags = SORT_REGULAR ][, bool $descending = false ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$flags
: int
= SORT_REGULAR
-
-
$descending
: bool
= false
-
Return values
array<string|int, mixed>
array_ksort_desc()
Sort array by keys, descending
array_ksort_desc(array<string|int, mixed>|AbstractArray $array[, int $flags = SORT_REGULAR ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$flags
: int
= SORT_REGULAR
-
Return values
array<string|int, mixed>
array_usort()
Sort array by user-defined callback
array_usort(array<string|int, mixed>|AbstractArray $array, mixed $callback[, bool $assoc = true ]) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$callback
: mixed
-
-
$assoc
: bool
= true
-
Return values
array<string|int, mixed>
array_uksort()
Sort array by user-defined callback using keys
array_uksort(array<string|int, mixed>|AbstractArray $array, mixed $callback) : array<string|int, mixed>
Parameters
-
$array
: array<string|int, mixed>|AbstractArray
-
-
$callback
: mixed
-
Return values
array<string|int, mixed>
array_make()
Force value to be any array (if it is not one already)
array_make(mixed $value) : array<string|int, mixed>
Parameters
-
$value
: mixed
-
Return values
array<string|int, mixed>