isset

(unknown)

isset -- Determine whether a variable is set

Description

boolean isset (mixed var)

Returns TRUE if var exists; FALSE otherwise.

If a variable has been unset with unset(), it will no longer be isset(). isset() will return FALSE if testing a variable that has been set to NULL. Also note that a NULL byte ("\0") is not equivalent to the PHP NULL constant.

$a = "test";
echo isset ($a); // TRUE

unset ($a);
echo isset ($a); // FALSE

$foo = NULL;
print isset ($foo); // FALSE

See also empty() and unset().