3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sentence = 'This www.google.com is the http://www.facebook.com website that https://www.amazon.com make me awesome'; $pattern = '@((https?://)?([-\\w]+\\.[-\\w\\.]+)+\\w(:\\d+)?(/([-\\w/_\\.]*(\\?\\S+)?)?)*)@'; preg_match_all($pattern, $string, $matchFound); echo '<pre>'; print_r($matchFound[0]);
Output for 5.6.0 - 5.6.30, hhvm-3.21.0, 7.0.0 - 7.3.0rc3
Notice: Undefined variable: string in /in/QaGVl on line 6 <pre>Array ( )
Output for hhvm-3.18.4
Notice: Undefined variable: string in /in/QaGVl on line 6 Warning: preg_match_all() expects parameter 2 to be string, null given in /in/QaGVl on line 6 <pre>