Isset¶
isset() is a function that determines if a variable is declared and is different than null.
Isset() is also related to the magic method __isset(), which is used to determine if a property in an object exists or not.
<?php
$var = 'something';
if (isset($var)) {
echo 'The variable $var contains '.$var;
} else {
echo 'No such variable as $var';
}
?>
Related : Magic Methods, __isset() method