literal strings vs variable strings
| From: | Martin Scotta | Date: | Thu, 13 Aug 2009 14:02:40 +0000 |
| Subject: | literal strings vs variable strings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-296741@lists.php.net to get a copy of this 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