Re: what happened to that new isset() like language construct
| From: | Andi Gutmans | Date: | Fri, 09 Jul 2004 22:06:58 +0000 |
| Subject: | Re: what happened to that new isset() like language construct | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11045@lists.php.net to get a copy of this message | ||
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:Well am not sure what you mean by more powerful, but the character count is about the same: $a = ifsetor($b); 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. And the second one has the advantage of being more verbose. That's why ifsetor has two versions. regards marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php?: would require a default value. ifsetor() allows to assume NULL hence the latter is more powerfull. Hence id like to see a new keyword.