- mb_strtoupper: documentation ( source)
- mb_strtolower: documentation ( source)
<?php
declare(strict_types=1);
function bigLetters(string $text): string
{
return mb_strtoupper($text);
}
function smallLetters(string $text): string
{
return mb_strtolower($text);
}
function printBigLetters(string $text): void
{
echo bigLetters($text) . PHP_EOL;
}
function printSmallLetters(string $text): void
{
echo smallLetters($text) . PHP_EOL;
}
$text1 = 'DrUkOwAnIe DuŻyMi LiTeRaMi';
$text2 = 'DrUkOwAnIe MaŁyMi LiTeRaMi';
printBigLetters($text1);
printSmallLetters($text2);