RE: [PHP-DEV] feature request

From: Date: Mon, 19 Mar 2001 18:08:55 +0000
Subject: RE: [PHP-DEV] feature request
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-49367@lists.php.net to get a copy of this message
:) Andi At 08:25 AM 3/19/2001 -0700, Chris Newbill wrote:
That is the only thing that I see of any real use as well. I was just humoring Andi and his idea that we would soon be requesting that feature of knowing which one failed the test. -Chris -----Original Message----- From: Zeev Suraski [mailto:zeev@zend.com] Sent: Monday, 19 March, 2001 7-04 aM To: Phil Driscoll Cc: Chris Newbill; Andi Gutmans; PHP DEV Subject: Re: [PHP-DEV] feature request Phil is right. The only thing that may be both useful and practical would be isset() on multiple variables, returning either true or false. Zeev At 11:31 19/3/2001, Phil Driscoll wrote:
$a = 1; $b = 2; $d = 4; $play_nice = isSet($a, $b, $c, $d); if (!$play_nice) { print "The variable missing is in position "; print ($play_nice*-1); } And it would print 3, in which case we would know $c is not
set. I'm not
that sure about this approach, seems like a hack,
It is a hack - what if $a AND $c were unset. You really need to return an arbitrary length bitfield, with one bit for each arg. Then the
sensible name
for the function would be isunset! That said, I think the whole idea is bad. I appreciate the
reduced number of
keypresses involved, but I don't think that this is a feature
you can apply
orthogonally to the rest of the language without serious
repercussions, and
therefore it would not posses the desirable attribute that you
would be able
to guess that isset worked this way. Hence my vote: (X) don't make sweeping changes to language functionality without fully considering the repercussions. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#49367) next »