3v4l.org

run code in 300+ PHP versions simultaneously
<?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]); }

preferences:
40.2 ms | 402 KiB | 5 Q