3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('BR', "\n"); define('DS', DIRECTORY_SEPARATOR); $str = 'template/base/files/js\jquery1.11.min.js'; $str = str_replace(array('\\', '/'), DS, $str); echo $str . BR; $pos = substr($str, 0, strrpos($str, DS, 0)); echo $pos;
Output for 5.0.0 - 7.1.0
template/base/files/js/jquery1.11.min.js template/base/files/js
Output for 4.3.0 - 4.4.9
template/base/files/js/jquery1.11.min.js Warning: Wrong parameter count for strrpos() in /in/SYYAF on line 7