I dont think so, because PHP is an interpreter, the string 'something' has
to be extracted and then be put in memory after that the code will compare
the two memory locations. doesnt give me any benefit.

however, comparing strings with the '==' does involve case sensitivity and
also leading or trailing spaces will guide to not equal. thats why I prefere
the comparison functions anyway

"Martin Scotta" <martinsco...@gmail.com> wrote in message
> Hi all.
> Is this going to save me anything?
> <?php # literal
> foreach($items as $item)
>    if( 'something' == $item->something() )
>          return true;
> <?php # variable
> $something = 'something';
> foreach($items as $item)
>    if( $something == $item->something() )
>          return true;
> -- 
> Martin Scotta

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

Reply via email to