3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = '/var/www/vb/frontend/web/img/up/bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l.jpg'; var_dump( preg_match_all('/(.*)\/img\/up\/(.*).jpg/', $s, $matches), $matches );
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(1) array(3) { [0]=> array(1) { [0]=> string(109) "/var/www/vb/frontend/web/img/up/bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l.jpg" } [1]=> array(1) { [0]=> string(24) "/var/www/vb/frontend/web" } [2]=> array(1) { [0]=> string(73) "bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l" } }