Server.php 276 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 <?php namespace WPML\SuperGlobals; use WPML\FP\Obj; class Server { public static function getServerName() { return filter_var( Obj::prop( 'HTTP_HOST', $_SERVER ), FILTER_SANITIZE_URL ) ?: filter_var( Obj::prop( 'SERVER_NAME', $_SERVER ), FILTER_SANITIZE_URL ); } }