3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "Hello world; This is a nice day; after"; $str = explode(";",$string); $size=sizeof($str); $newstr = array(); $newstr[0] = $str[$size-1]; $newstr[1] = substr($string, 0, strrpos($string, ";")); print_r($newstr);
Output for 4.3.0 - 7.1.0
Array ( [0] => after [1] => Hello world; This is a nice day )