note 77076 deleted from function.isset by googleguy

From: Date: Sat, 19 Jan 2013 03:54:52 +0000
Subject: note 77076 deleted from function.isset by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193269@lists.php.net to get a copy of this message
Note Submitter: codeslinger at compsalot dot com ---- The behavior of isset is complex and the results are sometimes not what people expected -- to their peril. After dealing with isset() for awhile and peppering my code with additional checks for edge cases. I eventually got to know and love empty() Most of the places that you are using isset(), empty() would do a better job. And when you are dealing with arrays what you probably want to use instead of isset() is array_key_exists() These days, I almost never use isset() and I write a lot of code.

« previous php.notes (#193269) next »