3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = explode('/', 'auth/signin.json'); $tail = end($arr); $dot = strpos($tail, '.'); var_dump($tail, $dot); var_dump(substr($tail, 0, $dot));
based on r0eVa
Output for 4.3.0 - 7.1.0
string(11) "signin.json" int(6) string(6) "signin"