3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = 'http://localhost/new-123-rugby/competition.php?croncode=12345678'; $array = explode('/', $string); $array[count($array) - 1] = ''; // empty the last component echo(implode('/', $array)); // join the pieces back
based on 56Mp7