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]); echo $pieces[$i].'<br>'; $pieces[$i] = ucfirst($pieces[$i]); echo $pieces[$i].'<br>'; } $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" hello form world<br>Hello form world<br>string(13) " i am windows" i am windows<br> i am windows<br>string(12) " i am linux " i am linux <br> i am linux <br>Hello form world. i am windows. i am linux