$_SESSION['login_return_url'] = $_SERVER['REQUEST_URI'];
session_register — Register one or more global variables with the current session.
<?php // Use of $_SESSION is preferred, as of PHP 4.1.0 // The old way was to use $HTTP_SESSION_VARS
// Use of session_register() is deprecated
$barney = "A big purple dinosaur.";
session_register("barney");
$_SESSION["zim"] = "An invader from another planet.";
$HTTP_SESSION_VARS["spongebob"] = "He's got square pants.";
?>
Source: PHP.net
$_SERVER is one example of a predefined variable.
$HTTP_SERVER_VARS [deprecated] — Server and execution environment information
‘REQUEST_URI’ – The URI which was given in order to access this page; for instance, ‘/index.html’.
Source: PHP.net