pascal.php
Table of Contents
Functions
- pascal() : string
- Converts a string to PascalCase (a.k.a. UpperCamelCase).
Functions
pascal()
Converts a string to PascalCase (a.k.a. UpperCamelCase).
pascal(string|null $source[, array<int, string> $separators = ["_", "-", "/"] ]) : string
Builds on camel() and then upper-cases the first character via ucFirst().
Returns an empty string when the source is null or empty.
Parameters
- $source : string|null
-
The input string to convert.
- $separators : array<int, string> = ["_", "-", "/"]
-
Separator characters split into words before conversion. Defaults to
["_", "-", "/"].
Tags
Return values
string —The PascalCase representation of the input string.