check urel in php

PHP
gettype ( mixed $var ) : string
if (typeof myVariable === 'undefined'){
    //myVariable is undefined
}
Source

Also in PHP: