Possible Duplicate:
is_null($x) vs $x === null in PHP
In the following context !== null
, !is_null()
and isset()
all produce the same result:
$foo = null;
function foo() {
if ($this->foo !== null) {
...
}
if (!is_null($this->foo)) {
...
}
if (isset($this->foo)) {
...
}
}
Which one is the quickest and which would you recommend in that context?