Fix for FR #34407 - ucwords and title case

Original feature request can be found [here](https://bugs.php.net/bug.php?id=34407)