3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = '/privateavatar/3de0948dc257e0a62d3a970eca5d6be0/Filename.png'; echo '#' . substr($test, 1, strcspn($test, '/', 1)) . '#', "\n"; echo '#' . substr($test, 1, strpos($test, '/', 1) - 1) . '#', "\n"; echo '#' . substr(dirname(dirname($test)), 1) . '#', "\n"; echo '#' . strtok($test, '/') . '#', "\n";
Output for 4.3.2 - 7.2.0
#privateavatar# #privateavatar# #privateavatar# #privateavatar#
Output for 4.3.0 - 4.3.1
## #privateavatar# #privateavatar# #privateavatar#