note 86634 deleted from function.empty by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 06:44:15 +0000 |
| Subject: | note 86634 deleted from function.empty by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196616@lists.php.net to get a copy of this message | ||
Note Submitter: nizamgok at gmail dot com
----
By definition empty( mixed* $var ) cannot accept all types. For example, define constants will
cause error if you try to test them.
* mixed indicates that a parameter may accept multiple (but not necessarily all) types.
This will produce error:
define("CONSTANT", "Hello world.");
var_dump( empty( CONSTANT ) );
At first, this seemed to me very legal, but then I realized the fact that it just doesn't
work.