Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83943 invoked by uid 1010); 7 Jun 2005 03:09:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 83924 invoked from network); 7 Jun 2005 03:09:00 -0000 Received: from unknown (HELO gmail.com) (127.0.0.1) by localhost with SMTP; 7 Jun 2005 03:09:00 -0000 X-Host-Fingerprint: 64.233.184.198 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.198:10535] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 52/62-52832-CCF05A24 for ; Mon, 06 Jun 2005 23:09:00 -0400 Received: by wproxy.gmail.com with SMTP id 63so208470wri for ; Mon, 06 Jun 2005 20:08:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IJhPkvyY+NI8w6h6JLacUzcLlmQMqFGGQ0cFXjwdLnFhea1cFsf37u0mPpGMuapDdn3w32ghvDY9auvYQnaATTyisC3fQsQ6KZY4IgdsU4SQZiQpYreB7vkxmuv42Y2GF3cSGJWh5YWBUZHdQCwFcuNITzuSWfxcCXvEIJ2t3WY= Received: by 10.54.20.7 with SMTP id 7mr175158wrt; Mon, 06 Jun 2005 20:08:56 -0700 (PDT) Received: by 10.54.20.24 with HTTP; Mon, 6 Jun 2005 20:08:56 -0700 (PDT) Message-ID: <28139bc0506062008385bddb0@mail.gmail.com> Date: Tue, 7 Jun 2005 11:08:56 +0800 Reply-To: Xuefer To: Jason Garber Cc: Sean Coates , internals@lists.php.net In-Reply-To: <491379771.20050606151137@ionzoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5.1.0.14.2.20050603203711.028e9140@localhost> <5.1.0.14.2.20050605120644.033c8a00@localhost> <1852284679.20050606131608@ionzoft.com> <42A48643.3070704@caedmon.net> <491379771.20050606151137@ionzoft.com> Subject: Re: [PHP-DEV] PHP 5.1 From: xuefer@gmail.com (Xuefer) (recall: eliminating warning is as important as dealing with errors. u can't figure out which warning is relative to the problem if there's too many noise warning.) all of u in -internals is expert. u might have forgot how ppl learn php. "simple" is the spirit of php, but is adding feature always make php complex? in the following example, it's actually much simple, it's not the problem we type how much letters it's 'how' we code, how the beginner will code. *** if u give the beginners "ifsetor", they will use it happily, not the "isset + ?:" one. u might say "hey, beginners should always learn not to be one". but i would say, no. there're many beginners who write many big programms(and bad), they even share it with others but don't even know he should do this that way and do that this way.(think of why there is non-addslashed code which lead to sql injection, and use of eval which lead to php injection, and .. ) +1 for "ifsetor" but btw, "ifsetor" might be complex for non-englishs. "default" might be be= tter. ----- > $value =3D (integer) (isset($myBigArray['SomeKey1']['SomeOtherKey']) ? > $myBigArray['SomeKey1']['SomeOtherKey'] : 0); >=20 > where >=20 > $value =3D ifsetor($myBigArray['SomeKey1']['SomeOtherKey'], 0); >=20 > is a bit cleaner. no, it's a lot! >=20 > Thanks.