note 121295 deleted from function.isset by cmb

From: Date: Sun, 05 Jan 2020 08:10:09 +0000
Subject: note 121295 deleted from function.isset by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213737@lists.php.net to get a copy of this message
Note Submitter: dominic dot mayers at meditationstudies dot org ---- The doc says that isset "determines if a variable is set and is not NULL." I prefer to simply say that it "determines that a variable is set," that's it. Adding "is not NULL" is redundant, because isset($v) is the same as ! is_null($v) : http://php.net/manual/en/types.comparisons.php. The extra "is not NULL" is actually a bit confusing. Some might start to complain that it would have been simpler to only determine that the variable is set, not realizing that it's exactly what isset does. The purpose of the redundant "is not NULL" is to bring out that if a variable is set to NULL, isset will return false, but it was implicit in the definition of NULL.

« previous php.notes (#213737) next »