On Fri, 16 Apr 2004, Christian Schneider wrote:
> Marcus Boerger wrote:
> > [RFC] ifsetor operator
> >
> > Synopsis: "ifsetor" "(" value "," default ")"
> > Returns the value if it exists or a given default value.
> > Syntax: "ifsetor" "(" variable [ "," expression ] ")"
> > Semantic:
> > - The value in question must be a variable.
>
> I'd prefer to not have this restriction, a return value from a function
> call should be fine. I'd make this any expression.
isset() works on a variable only too, so this behavior matches already
existing behavior.
>
> > - The default value can be any expression.
> > - The default value can be omitted in which case NULL will be used.
>
> I'd also propose to extend this to a whole list of expressions:
no thanks.
> Just brainstorming: An other idea would be an operator like "|||":
> $a = $a1 ||| $a2 ||| $a3;
that looks too perlish. Be happy with what we came up with now.
Derick
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php