3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $expr = '#[a-z][a-z0-9.]*://(?:[^:@]+(?:[^@]+)?@)?[^:/]+(?::[0-9]+)?/([^/]+)#'; $str = 'http://dontmatchthis.local/butmatchthisplease'; preg_match($expr, $str, $matches); var_dump($matches);
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(45) "http://dontmatchthis.local/butmatchthisplease" [1]=> string(18) "butmatchthisplease" }
Output for hhvm-3.10.0

Process exited with code 153.