Re: feature request

From: Date: Mon, 19 Mar 2001 09:31:55 +0000
Subject: Re: feature request
Groups: php.dev 
Request: Send a blank email to php-dev+get-49333@lists.php.net to get a copy of this message
>$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

« previous php.dev (#49333) next »