isset

(unknown)

isset -- Determine whether a variable is set

Description

boolean isset ( mixed var [, 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";
$b = "anothertest";

echo isset ($a); // TRUE
echo isset ($a, $b) //TRUE

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

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

See also empty() and unset().