Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51885 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8195 invoked from network); 14 Apr 2011 10:07:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2011 10:07:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=h.reindl@thelounge.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=h.reindl@thelounge.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thelounge.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: h.reindl@thelounge.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Windows 98 (1) Received: from [91.118.73.15] ([91.118.73.15:36903] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/9A-44901-257C6AD4 for ; Thu, 14 Apr 2011 06:07:15 -0400 Received: from [10.0.0.99] (rh.thelounge.net [10.0.0.99]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.thelounge.net (Postfix) with ESMTPSA id A3F49B3 for ; Thu, 14 Apr 2011 12:07:11 +0200 (CEST) Message-ID: <4DA6C74F.2020104@thelounge.net> Date: Thu, 14 Apr 2011 12:07:11 +0200 Organization: the lounge interactive design User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: internals@lists.php.net References: <4D950434.3060704@yahoo.com.au> <4D9E0543.1080600@lerdorf.com> <69.82.36433.EC33E9D4@pb1.pair.com> <4D9E34C4.5000406@lerdorf.com> <4D9E429B.20503@sugarcrm.com> <4D9E96B6.6060401@lerdorf.com> <718216446.20110408143441@cypressintegrated.com> <4DA0E71C.9030008@gmail.com> <4DA63ED8.4080402@yahoo.com.au> In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=7F780279; url=http://arrakis.thelounge.net/gpg/h.reindl_thelounge.net.pub.txt Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3F418823EB20063413EEFA17" Subject: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator From: h.reindl@thelounge.net (Reindl Harald) --------------enig3F418823EB20063413EEFA17 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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'] =3D array ( 'icon' =3D> 'bla.gif', 'default_params' =3D> array ( 'autocleanup' =3D> 1, 'ignore_user_abort' =3D> 0, ) ); if 'default_params' are optional you NEED isset() to decide do something with them or skip operations --------------enig3F418823EB20063413EEFA17 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk2mx08ACgkQhmBjz394AnlOcwCdFuZPMargAonC6CoaMnkIvVdW 6S8An3Lm1bYrwKoyScZqOnNjEieRdAG8 =TzOs -----END PGP SIGNATURE----- --------------enig3F418823EB20063413EEFA17--