In, PHP NaN
is a float. See the docs: http://www.php.net/manual/en/language.types.float.php#language.types.float.nan
Because of this, is_nan
wants a float
as a parameter. It will tell you whether it's NaN or not.
In your case, you want is_numeric
.
if(!is_numeric($_GET["ean"])){
}