3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "http://google.at;www.davetrudes.com asdf http://www.youtube.com/user/davetrudes http://code.google.com/u/dave.trudes/"; $match = null; preg_match_all('/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/', $string, $match); var_dump($match);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(3) { [0]=> string(16) "http://google.at" [1]=> string(38) "http://www.youtube.com/user/davetrudes" [2]=> string(37) "http://code.google.com/u/dave.trudes/" } }