3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "http://teamhi.local/index.php?url=aaa"; rtrim($str,'/'); $arr = explode('/',$str); print_r($arr); echo $str;

preferences:
27.18 ms | 402 KiB | 5 Q