3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = 'hello form world. i am windows. i am linux '; $pieces = explode(".", $foo); for($i=0;$i<count($pieces);$i++){ var_dump($pieces[$i]); $pieces[$i] = ucfirst($pieces[$i]); } $imp = implode(".", $pieces); echo $imp;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(16) "hello form world" string(13) " i am windows" string(12) " i am linux " Hello form world. i am windows. i am linux