<?php
if (isset($test) && $test != NULL) {
echo '$test set and not null';
} else {
echo '$test not set and not null';
}
$test = '';
if (isset($test) && $test != NULL) {
echo '$test set and not null';
} else {
echo '$test not set and not null';
}
if (isset($test)) {
echo '$test set, even when null';
}
$test = "abc";
if (isset($test) && $test != NULL) {
echo '$test set and not null';
} else {
echo '$test not set and not null';
}