3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('#^((http:|https:)?//(www\.)?moscow\.megafon\.ru|/[^/]).*$#sU', 'http://moscow.megafon.ru/internet/tariffs/', $m); var_dump($m);
Output for 4.3.0 - 7.2.0
array(3) { [0]=> string(42) "http://moscow.megafon.ru/internet/tariffs/" [1]=> string(24) "http://moscow.megafon.ru" [2]=> string(5) "http:" }