Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23136 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61745 invoked by uid 1010); 3 May 2006 23:47:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61730 invoked from network); 3 May 2006 23:47:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2006 23:47:37 -0000 X-PHP-List-Original-Sender: dante@vocalspace.com X-Host-Fingerprint: 69.56.193.72 fox02.stravio.com Linux 2.5 (sometimes 2.4) (4) Received: from ([69.56.193.72:49040] helo=fox02.stravio.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B5/16-63443-91149544 for ; Wed, 03 May 2006 19:47:37 -0400 Received: from [127.0.0.1] (unknown [66.243.31.162]) by fox02.stravio.com (Postfix) with ESMTP id 6B14B26C320; Wed, 3 May 2006 18:47:29 -0500 (CDT) Message-ID: <4459410D.9090802@vocalspace.com> Date: Wed, 03 May 2006 18:47:25 -0500 User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: Rick Widmer Cc: PHPdev References: <44584619.60400@lorenso.com> <200605030815.34801.johannes@php.net> <44585828.1030603@vocalspace.com> <44585E89.6000400@vocalspace.com> <44586BDF.6040600@developersdesk.com> In-Reply-To: <44586BDF.6040600@developersdesk.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Seeking 'coalesce' php internal function From: dante@vocalspace.com ("D. Dante Lorenso") Rick Widmer wrote: > D. Dante Lorenso wrote: >> Eric, >> This reply is too basic and is not the answer. The problem is more >> complex then you have grasped. > function ifsetor() { > $args = func_get_args(); > $count = count( $args ); > > for( $i=0; $i<$count; $i++ ) { > if isset( $args[ $i ] )) { > return $args[ $i ]; > } > > return false; > } > No, that doesn't address the problem. See this: ---------- 8< -------------------- 8< -------------------- 8< ----------

PHP Notice: Undefined variable: x in .../ifsetor.php on line 13 PHP Notice: Undefined variable: y in .../ifsetor.php on line 13 PHP Notice: Undefined variable: z in .../ifsetor.php on line 13 ---------- 8< -------------------- 8< -------------------- 8< ---------- See my post regarding a specification for 'filled()' as a function. An important feature is that warnings about unset variables should not occur. Your suggestion does not qualify. This problem can not be solved in userspace. Dante