3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $adres = $_SERVER['SCRIPT_NAME']; echo $adres; echo "\n"; echo $adres="pl/blog/2016/11/08/raiffeisen-polbank-mobilny-portfel/"; echo "\n"; echo strstr($adres, "blog"); echo "\n"; $url=explode("/", $adres); $size=count($url); echo $size; echo "\n"; echo $url[$size-2]; echo "\n"; echo $url[0];
based on Ak5TH
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
/in/cb5m1 pl/blog/2016/11/08/raiffeisen-polbank-mobilny-portfel/ blog/2016/11/08/raiffeisen-polbank-mobilny-portfel/ 7 raiffeisen-polbank-mobilny-portfel pl