3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_origin = "http://full.server.name"; preg_match('/[^.]+\.[^.]+$/', $server_origin, $matches); $origin = $matches[0]; echo $origin;

preferences:
39.23 ms | 404 KiB | 5 Q