Re: [PHP4BETA] Is this a good idea for an operator?
| From: | Michael Stearne | Date: | Tue, 03 Aug 1999 16:50:54 +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-3070@lists.php.net to get a copy of this message | ||
I like this style. I don't like the 'in' syntax for the exact reason it
was suggested, its likes Perl or Pascal. I just personally prefer C
style syntax.
Michael
Johan Isacsson wrote:
>
> Dont know if this is taken but i'd like:
>
> if($action =& ("modify","create","delete")) {
>
> if($action =| ("modify","create","delete")) {
>
> if($action !& ("modify","create","delete")) {
>
> /Johan Isacsson
>
> On Tue, 3 Aug 1999, Michael Stearne wrote:
>
> >
> >
> > John Coggeshall wrote:
> > >
> > > > Instead of this in PHP/C code
> > > > if ($action=="modify" || $action=="create" ||
> > > > $action=="delete") {
> > > >
> > > > have this
> > > >
> > > > if ($action in ("modify","create","delete")) {
> > >
> > > Or
> > >
> > > if ($action || ("modify", "create", "delete")) {
> > >
> >
> > I think this is better also
> >
> > or even:
> >
> > if ($action == ("||","modify", "create",
> > "delete")) {
> >
> > if ($action == ("&&","modify", "create",
> > "delete")) {
> >
> > if ($action != ("&&","modify", "create",
> > "delete")) {
> >
> > Michael
> >
> > --
> > PHP 4 Beta
> >
> >