On Thu, Mar 21, 2002 at 12:36:26AM +0200, Bogdan Stancescu wrote:

> Hi all!
> 
> I'd like to hear from a single one of you who isn't tired of code similar to
 
i'm solving this with some little knowledge of shortcuts evaluation ...

> <?
>  if (!$whatever) {
>    $whatever=something;
>  }
> ?>

(($whatever) || ($whatever = something));

> or else
> 
> <?
>  if ($whatever)
>  {
>    $somethingelse=$whatever;
>  }
> ?>
(($whatever) && ($somethingelse=$whatever));

> How about a new asignment operator which would shut up all those Python 
> enthusiasts - let's say the new operator would be caret - and we could 
> replace the first example with
sounds interesting.

IMHO you have to rewrite some stuff in the php language parser
so it detects these expressions and generates an if-else-tree ...

~-n
--
 Enrico Weigelt    ==   meTUX IT services 
 software development, IT service, internet security solutions
 www:     http://www.metux.de/        phone:     +49 36207 519931
 email:   [EMAIL PROTECTED]            cellphone: +49 174 7066481

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

Reply via email to