3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $full_name = 'Jason'; $name = explode(' ', $full_name, 2); if(count($name) < 2) { $first_name = null; $last_name = $name[0]; } else { $first_name = $name[0]; $last_name = $name[1]; } echo "First: $first_name .. Last: $last_name";
Output for 4.3.0 - 7.1.0
First: .. Last: Jason