What are some common superglobal variables in PHP that can be used to retrieve information about the current URL?

To retrieve information about the current URL in PHP, you can use superglobal variables like $_SERVER['REQUEST_URI'], $_SERVER['HTTP_HOST'], and $_SERVER['QUERY_STRING']. These variables contain information such as the path, host, and query string of the current URL, which can be useful for various purposes like generating dynamic links or tracking user activity.

$currentURL = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo $currentURL;