3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello world; This is a nice day; after"; $str = explode(";",$string); $size=sizeof($str); $newstr = $str[$size]." ".substr($string, 0, strrpos($string, ";"));

preferences:
33.34 ms | 402 KiB | 5 Q