Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / PHP

strtoupper()

Uppercase ASCII lowercase letters across all positions.

Version: PHP 8.4; repository runtime, production runtime not attested

Syntax

strtoupper(string $string): string

Uppercase ASCII lowercase letters across all positions. In PHP 8.2 and later locale settings do not affect this transformation. UTF-8 letters outside ASCII and punctuation remain unchanged, so this is suitable for ASCII identifiers rather than general Unicode uppercasing.

Signature

strtoupper(string $string): string

Example output

["TAG-1","STRAßE"]

Examples

<?php
echo json_encode([strtoupper("tag-1"),strtoupper("stra\u{00DF}e")],JSON_UNESCAPED_UNICODE);

Result

["TAG-1","STRAßE"]

Sources