How to get current page URL in php

Our Current url is

echo $url;

Output :
REQUEST_URI  return only  root website folder instead of returning full page.
if you want actual link then use this syntax

$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo $actual_link ;

Output :
In the above code $_SERVER[‘HTTP_HOST’] return the  domain name through which the current request is being fulfilled.