Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-10 Thread Marcus Boerger
Hello & thanks Guy, a very constructive mail! Of yours i like getval() and var_default() and getdefault() a little bit. so atm i am in favor of either getval() or ifsetor(). marcus Saturday, July 10, 2004, 3:20:15 AM, you wrote: > Andi Gutmans wrote: >> Personally I am not that fond of ifs

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-09 Thread Guy N. Hurst
Andi Gutmans wrote: Personally I am not that fond of ifsetor(), but I am definitely not fond of ?: because of Marcus' reasons. Here is a list of other possible names to ponder, with examples: // family: gettype, getenv, getopt, gets, getc getval() // $v = getval($_GET['v'],0);

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-09 Thread Andi Gutmans
Personally I am not that fond of ifsetor(), but I am definitely not fond of ?: because of Marcus' reasons. At 12:26 AM 7/9/2004 +0200, Marcus Boerger wrote: Hello Marc, Thursday, July 8, 2004, 11:54:59 PM, you wrote: > Marcus Boerger wrote: >> >> ?: would require a default value. ifsetor() allows

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Marc Richards
Marcus Boerger wrote: it would allow two versions by having the default optional: 1) $a = ifsetor($b) 2) $a = ifsetor($b, NULL) $a = $b ?: NULL; How would the operator do the second? Will it look like the following? $a = $b ?:; I defitively don't want that. Me either. What I am saying is that

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Marcus Boerger
Hello Marc, Thursday, July 8, 2004, 11:54:59 PM, you wrote: > Marcus Boerger wrote: >> >> ?: would require a default value. ifsetor() allows to assume NULL hence >> the latter is more powerfull. Hence id like to see a new keyword. >> > Well am not sure what you mean by more powerful, but the

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Marc Richards
Marcus Boerger wrote: ?: would require a default value. ifsetor() allows to assume NULL hence the latter is more powerfull. Hence id like to see a new keyword. Well am not sure what you mean by more powerful, but the character count is about the same: $a = ifsetor($b); $a = $b ?: NULL; And the se

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Marcus Boerger
Hello Marc, Thursday, July 8, 2004, 4:07:54 PM, you wrote: > Marcus Boerger wrote: >> Hello Marc, >> >> it somply was far too lat3e in relase process. That's wy we ae all agreed >> to delay that until 5.1. Also we were very unsure about the name of such >> an operatorif you can collect all t

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Marcus Boerger
Hello Jay, Thursday, July 8, 2004, 5:31:08 PM, you wrote: > Marc Richards wrote: >> >> Well I'm partial to ?: and there seemed to be some support for it, but >> there also seemed to be a non-trivial (though not necessarily difficult) >> amount of work to get it to work right. >> >> ifsetor() is

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Jay Smith
Marc Richards wrote: > > Well I'm partial to ?: and there seemed to be some support for it, but > there also seemed to be a non-trivial (though not necessarily difficult) > amount of work to get it to work right. > > ifsetor() is obviously less concise, but also the name at first glance > is a li

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-08 Thread Marc Richards
Marcus Boerger wrote: Hello Marc, it somply was far too lat3e in relase process. That's wy we ae all agreed to delay that until 5.1. Also we were very unsure about the name of such an operatorif you can collect all the ideas or can come up with ther perfect one!?! Well I'm partial to ?: and th

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-07 Thread Marcus Boerger
Hello Marc, it somply was far too lat3e in relase process. That's wy we ae all agreed to delay that until 5.1. Also we were very unsure about the name of such an operatorif you can collect all the ideas or can come up with ther perfect one!?! a patch is here: http://marcus-boerger.de/php/ext/

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-07 Thread Jason Garber
Hi Marc, What we basically settled on was to use this syntax (as a new language construct): $x = ifsetor(mixed variable, mixed default); If I recall correctly, Marcus had a patch that implemented it and it was going to be plugged in in the 4.1 branch (when it is created). I'm eagerly waiting fo

[PHP-DEV] what happened to that new isset() like language construct

2004-07-07 Thread Marc Richards
On 4/15/2004 Jason Garber asked about a new language construct to simplify testing if a variable isset() and assinging a default value for those that aren't. The thread title was "Construct Request". I rember reading it while the discussion went on, I just went back and browsed through it agai