"or does anyone have a solution?"

^ By that, I take it you might be looking for an alternate solution.

In order to keep the original value, you can assign it to a variable, and use strtolower() to make it lowercase, then strtoupper() to make it uppercase.

echo $original_string = "ORIGINAL UPPER CASE STRING and Camel Case or mIXed cASe";
echo "<br>";
echo $lowercased_string = strtolower($original_string) . " this has been converted.";
echo "<br>";
echo "The below is now in uppercase.";
echo "<br>";
echo $modified_string = strtoupper($original_string);
echo "<br>";

$var = $original_string . " is the original value.";
echo $var;

Note: Echoing an assigned variable is perfectly valid. You can remove those as needed.

The above will print:

ORIGINAL UPPER CASE STRING and Camel Case or mIXed cASe
original upper case string and camel case or mixed case this has been converted.
The below is now in uppercase.
ORIGINAL UPPER CASE STRING AND CAMEL CASE OR MIXED CASE
ORIGINAL UPPER CASE STRING and Camel Case or mIXed cASe is the original value.
Answer from Funk Forty Niner on Stack Overflow
๐ŸŒ
PHP
php.net โ€บ manual โ€บ en โ€บ function.strtolower.php
PHP: strtolower - Manual
To convert multibyte non-ASCII characters, use mb_strtolower(). ... The input string. Returns the lowercased string.
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ func_string_strtolower.asp
PHP strtolower() Function
โฎ PHP String Reference ยท Convert all characters to lowercase: <?php echo strtolower("Hello WORLD."); ?> Try it Yourself ยป ยท Share Link Copied ยท The strtolower() function converts a string to lowercase.
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ php โ€บ ujlkfeda โ€บ php-lowercase-string-example
How do I convert string to lowercase in PHP?
November 21, 2023 - To convert a string to lowercase in PHP, you can use the strtolower($string) function. The strtolower() function takes a string as a parameter and converts all uppercase English characters to lowercase.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ php โ€บ php-strtolower-function
PHP strtolower() Function - GeeksforGeeks
July 11, 2025 - <?php // Original string $str = "GeeksForGeeks"; // String converted to lower case $resStr = strtolower($str); print_r($resStr); ?>
๐ŸŒ
Dev Lateral
devlateral.com โ€บ home โ€บ guides โ€บ php โ€บ how to convert a php string to lower case
How to Convert a PHP String to Lower Case | Dev Lateral
November 1, 2023 - They allow you to manipulate strings in all sorts of ways. The function 'strtolower' stands for String to lower(case), which will take a given string and make all ASCII alphabetic characters lowercase.
Find elsewhere
๐ŸŒ
FlatCoding
flatcoding.com โ€บ home โ€บ php strtolower function: convert strings to lowercase
PHP strtolower Function: Convert Strings to Lowercase - FlatCoding
June 3, 2025 - Understand the array_map Function in PHP Theโ€ฆ ... The mb_strtolower() function in PHP turns every letter in a string into lowercase. It works with multibyte encodings like UTF-8.
๐ŸŒ
PHP Tutorial
phptutorial.net โ€บ home โ€บ php tutorial โ€บ php strtolower
PHP strtolower() Function - PHP Tutorial
May 8, 2021 - The strtolower() function accepts a string and returns a new string with all alphabetic characters converted to lowercase.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ php โ€บ php_function_strtolower.htm
PHP - strtolower() Function
This function converts all alphabetic characters in the given string "Hello World!" into lowercase โˆ’ ยท <?php $str = "Hello World!"; echo "The given string: $str"; echo "\nThe string after converting into lowercase: "; #using strtolower() function ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ php-make-a-lower-case-string-using-mb-strtolower
PHP โ€“ Make a lower case string using mb_strtolower()
March 15, 2026 - In PHP, we can use the function mb_strtolower() to change a given string into lower case. It returns strings with all alphabetic characters converted to lowercase characters, with proper support for multibyte character encodings.
๐ŸŒ
Superiorwebsys
superiorwebsys.com โ€บ 103-convert-string-to-lowercase-or-uppercase-tool-+-php-code
Web Development Blog: Convert String to Lowercase or Uppercase Tool (+ PHP code)
Basically, all you need to know to write this tool, it 2 functions in PHP: string strtolower ( string $str ) and string strtoupper ( string $string ) Here is complete code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ...
๐ŸŒ
Scientech Easy
scientecheasy.com โ€บ home โ€บ blog โ€บ case conversion in php: uppercase and lowercase
Case Conversion in PHP: Uppercase and Lowercase - Scientech Easy
May 23, 2025 - PHP provides a built-in function named strtolower() that is used to convert all alphabetic characters in a string to lowercase.
๐ŸŒ
Reintech
reintech.io โ€บ blog โ€บ php-strtoupper-strtolower-functions-complete-guide
PHP's `strtoupper()` and `strtolower()` Functions: A Complete Guide
April 14, 2023 - Conversely, strtolower() converts all alphabetic characters to lowercase: $string = "HELLO WORLD"; $lowercase = strtolower($string); echo $lowercase; // Output: hello world ยท Non-alphabetic characters (numbers, punctuation, whitespace) pass through unchanged: echo strtoupper("PHP 8.2 is GREAT!"); ...