3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = 'tehdgsd f fs fsddf sdf http://mail.ru?dsdfll fdsfsd'; if (preg_match_all("/(https?:\/\/[^\s]+)/", $text, $m)) { echo trim($matches[0][0]); }
based on SNTkC
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: matches in /in/7DMZD on line 3
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: matches in /in/7DMZD on line 3