Re: what happened to that new isset() like language construct
| From: | Marcus Boerger | Date: | Sat, 10 Jul 2004 09:35:02 +0000 |
| Subject: | Re: what happened to that new isset() like language construct | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11063@lists.php.net to get a copy of this message | ||
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 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);
> // $x = getval($_GET['x']);
> getv()
> // $v = getv($_GET['v'],0);
> // $x = getv($_GET['x']);
> getdefault()
> // $v = getdefault($_GET['v'],0);
> // $x = getdefault($_GET['x']);
> getd()
> // $v = getd($_GET['v'],0);
> // $x = getd($_GET['x']);
> // family: var_dump, var_export
> var_default()
> // $v = var_default($_GET['v'],0);
> // $x = var_default($_GET['x']);
> // family: floatval, intval, strval
> defaultval()
> // $v = defaultval($_GET['v'],0);
> // $x = defaultval($_GET['x']);
> shadowval()
> // $v = shadowval($_GET['v'],0);
> // $x = shadowval($_GET['x']);