ucfirst

Make a string's first character uppercase

&reftitle.description; `string` `ucfirst` `string` `string`

Returns a string with the first character of `string` capitalized, if that character is an ASCII character in the range from `"a"` (0x61) to `"z"` (0x7a).

&reftitle.parameters;

`string`

- The input string.

&reftitle.returnvalues;

Returns the resulting string.

&reftitle.changelog;

&Version; | &Description;
&strings.changelog.ascii-case-conversion;

&reftitle.examples;

### `ucfirst` example

    <?php
    $foo = 'hello world!';
    $foo = ucfirst($foo);             // Hello world!

    $bar = 'HELLO WORLD!';
    $bar = ucfirst($bar);             // HELLO WORLD!
    $bar = ucfirst(strtolower($bar)); // Hello world!
    ?>

&reftitle.seealso;

- `lcfirst`
- `strtolower`
- `strtoupper`
- `ucwords`
- `mb_convert_case`