3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host = "https://chat.stackoverflow.com/rooms/11/php/"; $currentDomain = preg_replace('(^.+\.(?=[^.]+\.[^.]+$))', $host); echo $currentDomain;

preferences:
56.06 ms | 1969 KiB | 5 Q