<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 03:43:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Court Ewing's Blog: Forget Concatenation; Format your strings!]]></title>
      <guid>http://www.phpdeveloper.org/news/15138</guid>
      <link>http://www.phpdeveloper.org/news/15138</link>
      <description><![CDATA[<p>
On his blog today <i>Court Ewing</i> has <a href="http://epixa.com/2010/09/forget-concatenation-format-your-strings">posted a tutorial</a> about a different approach to merging strings while formatting them at the same time - using <a href="http://php.net/sprintf">sprintf</a> and <a href="http://php.net/printf">printf</a> for more than just a single-shot output.
</p>
<blockquote>
I do it, you do it, everyone does it! We all concatenate. If you're simply combining a few variables or constants together, concatenation is the way to go. After all, it is quick and easy, and who can complain about that? However, concatenation does have two serious drawbacks: any sort of string formatting must be done manually, and it is difficult to visualize the "goal" string when it is sufficiently complex.
</blockquote>
<p>
He talks about the benefits of string formatting over basic string concatination like how easy it makes casting variable values - multiple or single - without you having to cast them manually and append. He gives a few code examples of how it can be used for simple formatting and how it can make escaping data used in multiple spots easier. He also includes a SQL query example showing the difference between using <a href="http://php.net/sprintf">sprintf</a> and a normal concatinated statement.
</p>]]></description>
      <pubDate>Thu, 16 Sep 2010 08:38:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Vinu Thomas' Blog: Replace print_r and var_dump with Krumo]]></title>
      <guid>http://www.phpdeveloper.org/news/9943</guid>
      <link>http://www.phpdeveloper.org/news/9943</link>
      <description><![CDATA[<p>
<i>Vinu Thomas</i> has <a href="http://blogs.vinuthomas.com/2008/04/07/replace-print_r-and-var_dump-with-krumo/">proposed a replacement</a> for the usual var_dump or print_r sort of debugging developers tend to do - <a href="http://krumo.sourceforge.net/">Krumo</a>.
</p>
<blockquote>
To put it simply, Krumo is a replacement for print_r() and var_dump(). By definition Krumo is a debugging tool (now for PHP5 only), which displays structured information about any PHP variable [...] it does the same job, but it presents the information beautified using CSS and DHTML.
</blockquote>
<p>
It also supports output of other data in a "pretty format" like backtraces, included files and a listing of all constants. You can check out a demo of it in action <a href="http://kaloyan.info/krumo/demo/index.php">here</a>.
</p>]]></description>
      <pubDate>Wed, 09 Apr 2008 14:44:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: HTML2PHP - Transformation Tool]]></title>
      <guid>http://www.phpdeveloper.org/news/4720</guid>
      <link>http://www.phpdeveloper.org/news/4720</link>
      <description><![CDATA[Via a post over on digg.com today, there's an interesting little tool called <a href="http://www.quasarcr.com/html2php/">HTML2PHP</a> that could be useful in some certain situations.
<p>
<a href="http://www.quasarcr.com/html2php/">The tool</a> takes in whatever text input you have and performs operations on it. For example, paste in some HTML and hit the button to submit it and out the other side pops HTML formatted to echo in PHP (using print). There are other options on the tool - the ability to use printf and echo along with print, to add in newlines, and to add parenthesis (depending on your preference).
<p>
It's nothing overly impressive, but if you have a large block of HTML that you need to work with, you might <a href="http://www.quasarcr.com/html2php/">check into it</a>...]]></description>
      <pubDate>Tue, 24 Jan 2006 07:11:39 -0600</pubDate>
    </item>
  </channel>
</rss>
