<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: PHP: Complex Variables in Strings</title> <atom:link href="http://tinsology.net/2009/06/php-complex-variables-in-strings/feed/" rel="self" type="application/rss+xml" /><link>http://tinsology.net/2009/06/php-complex-variables-in-strings/</link> <description>Searching for the Right Questions</description> <lastBuildDate>Sat, 18 Feb 2012 21:34:20 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Tinsley</title><link>http://tinsology.net/2009/06/php-complex-variables-in-strings/comment-page-1/#comment-1432</link> <dc:creator>Tinsley</dc:creator> <pubDate>Wed, 03 Jun 2009 18:45:05 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?p=735#comment-1432</guid> <description>I don&#039;t care much for the syntax either. Personally I like to avoid quotes all together in cases where there is more than one line of output:
&lt; ?php
$birthday = 16;
$today = 14;
?&gt;
Today is the &lt; ?php echo $today; ?&gt;th
My birthday &lt; ?php echo $birthday; ?&gt;th,
which is in &lt; ?php $birthday - $today; ?&gt; days.
&lt;?php
//more code
I&#039;m not so sure that it being faster is worth considering. I mentioned this in my post about over optimization. The performance difference between parsing the string versus concatenating it almost always negligable. In most cases I just use whatever method I think looks best.</description> <content:encoded><![CDATA[<p>I don&#8217;t care much for the syntax either. Personally I like to avoid quotes all together in cases where there is more than one line of output:</p><p>< ?php<br
/> $birthday = 16;<br
/> $today = 14;<br
/> ?><br
/> Today is the < ?php echo $today; ?>th<br
/> My birthday < ?php echo $birthday; ?>th,<br
/> which is in < ?php $birthday - $today; ?> days.<br
/> <?php<br
/> //more code</p><p>I&#8217;m not so sure that it being faster is worth considering. I mentioned this in my post about over optimization. The performance difference between parsing the string versus concatenating it almost always negligable. In most cases I just use whatever method I think looks best.</p> ]]></content:encoded> </item> <item><title>By: Mike</title><link>http://tinsology.net/2009/06/php-complex-variables-in-strings/comment-page-1/#comment-1430</link> <dc:creator>Mike</dc:creator> <pubDate>Wed, 03 Jun 2009 18:37:23 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?p=735#comment-1430</guid> <description>I dislike using curly braces (it makes the code look fulgy). I find something like:
echo &#039;My birthday is on the &#039;.$birthday.&#039;th&#039;;
Is a lot faster and looks so much better.</description> <content:encoded><![CDATA[<p>I dislike using curly braces (it makes the code look fulgy). I find something like:<br
/> echo &#8216;My birthday is on the &#8216;.$birthday.&#8217;th&#8217;;<br
/> Is a lot faster and looks so much better.</p> ]]></content:encoded> </item> </channel> </rss>
