3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
34.87 ms | 402 KiB | 5 Q