3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $regex = '%\A/(?<directory_prefix>lf|im)/(?<rule>[a-z-_^\d]+)/(?<ire_id>[0-9a-z]+(~\w{6})?)_(?<sty_id>\d+).(?<extension>jpg|gif|png|webp)\Z%i'; $string = '/lf/234/hash/30593/31985724/1/custom_image.png'; $result = preg_match($regex, $string, $matches); var_dump($regex); var_dump($string); var_dump($result); var_dump($matches);