this is a code sample:
class md {
public function __construct() {
if($this->getIsGuest()){
echo 'iam guest';
}
}
public function getIsGuest() {
return $this->getState('__id')===null;
}
public function getState($val) {
return '3';
}
is return $this->foo() === null is the default value of foo of nothing returned ?
getIsGuest()is returning the comparison of $this->getState(‘__id’) to null.If
$this->getState('__id')returns exactlynull, thengetIsGuest()function returns true. If it returns anything except exactlynull, then thegetIsGuest()function returns false.