Re: switch vs elseif

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 13, 2009 at 9:50 AM, Jochem Maas <jochem@xxxxxxxxxxxxx> wrote:
> switch (true) {
>        case ($x === $y):
>                // something
>                break;
>
>        case ($a != $b):
>                // something
>                break;
>
>        case (myFunc()):
>                // something
>                break;
>
>        case ($my->getChild()->hasEatenBeans()):
>                // something
>                break;
> }
>
> evil ... but it works.
>
> PS - hi, people happy new year (or whatever)

You too!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux