3v4l.org

run code in 150+ 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 - 5.6.21, hhvm-3.12.0, 7.0.0 - 7.1.0
#privateavatar# #privateavatar# #privateavatar# #privateavatar#
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.3.1
## #privateavatar# #privateavatar# #privateavatar#