<?php $string = 'aaAAąAŚĆżź'; echo preg_replace_callback( '/(\p{Lu})|(\p{Ll})/u', function($m) { return $m[1] ? mb_strtolower($m[1]) : mb_strtoupper($m[2]); }, $string );
You have javascript disabled. You will not be able to edit any code.