3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function remove_shout($_text,$_max_caps=3) { return preg_replace_callback('/[A-Z]{$_max_caps,}/',create_function('$matches','return strtolower($matches[0]);'),$_text); } $input = "This is so AWESOME COOL!"; echo remove_shout($input);
Output for 4.3.0 - 7.1.0
This is so AWESOME COOL!