RE: [PHP4BETA] Is this a good idea for an operator?
| From: | John Coggeshall | Date: | Tue, 03 Aug 1999 08:02:23 +0000 |
| Subject: | RE: [PHP4BETA] Is this a good idea for an operator? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3060@lists.php.net to get a copy of this message | ||
> Why don't you just do:
>
> $options=array("modify"=>0, "create"=>0, "delete"=>0);
> if(IsSet($options[$actions]))
> {
> }
>
> This works in PHP as it is and so doesn't require new syntax.
True, but it's the little things that make the coding easier... For
instance... I can type:
$myval = $myval+6;
but it's easier to type
$myval += 6;
just as
if($action || ("modify", "create", "delete"));
is easier to read and to type
> $options=array("modify"=>0, "create"=>0, "delete"=>0);
> if(IsSet($options[$actions]))
> {
> }
John