How can I swap around / toggle the case of the characters in a string, for example:
$str = \"Hello, My Name is Tom\";
After I run the code
Very similar in function to the answer by Mark.
preg_replace_callback( '/[a-z]/i', function($matches) { return $matches[0] ^ ' '; }, $str )