3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $path = '/srv/project/etc/view/my.twig'; $path = preg_replace('#\/\w+\.twig#','',$path); echo $path;
Output for 5.5.0 - 7.3.0rc4
/srv/project/etc/view