3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $val = "gboli insurance plc" ; echo breakWordThenTitle($val) , "\n" ; echo title($val) , "\n" ; function title($obj = null) { return ucwords(strval($obj)); } function breakWordThenTitle($obj = null) { $data=explode(" ",$obj); $rData=""; foreach($data as $d){ $rData.=ucwords($d)." "; } return $rData; }
based on 4ieuW
Output for 4.3.0 - 7.1.0
Gboli Insurance Plc Gboli Insurance Plc