$url = (int)$_SERVER['SERVER_PORT'] == 80 ? 'http://' : 'https://') . $_SERVER['HTTP_HOST']

 

╰︶﹉⋛⋋⊱⋋๑๑⋌⊰⋌⋚﹉︶╯