sql_regcase
<?php $version = "php 4.0"; print sql_regcase($version); // outputs [Pp] [Hh] [Pp] 4.0 ?>