3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $author = 'Jan Stanisław Nowak'; $foo = explode(' ', $author); $firstName = reset($foo); $lastName = end($foo); echo $firstName . ' ' . $lastName;
based on GFGET
Output for 4.3.0 - 7.2.0
Jan Nowak