Re: Implicit isset/isempty check on short-ternary operator
| From: | Reindl Harald | Date: | Thu, 14 Apr 2011 10:07:11 +0000 |
| Subject: | Re: Implicit isset/isempty check on short-ternary operator | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51885@lists.php.net to get a copy of this message | ||
Am 14.04.2011 12:02, schrieb Richard Quadling:
> I always declare my variables. So, I don't want to use isset() as they
> will be an incorrect test. I use is_null(). Specifically testing the
> value. If I've made a mistake and NOT declared the variable (or made a
> typo), I want to know. I don't want to hide it with isset()/empty()
yes and no
$config['modulename'] = array
(
'icon' => 'bla.gif',
'default_params' => array
(
'autocleanup' => 1,
'ignore_user_abort' => 0,
)
);
if 'default_params' are optional you NEED isset() to decide
do something with them or skip operations
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc