3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create_path($hash) { return preg_replace('#\w\K((?<=\w{5}).+)?#', '/', strtolower($hash)); } // will output something like "a/h/q/6/d/" echo create_path('aHq6dc93d7b');

preferences:
25.7 ms | 405 KiB | 5 Q