<?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>Thu, 15 May 2008 22:38:36 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHP in Action: Public constructors considered harmful]]></title>
      <guid>http://www.phpdeveloper.org/news/10109</guid>
      <link>http://www.phpdeveloper.org/news/10109</link>
      <description><![CDATA[<p>
According to the PHP in Action blog, public constructors can be <a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=34&blogId=1">hazardous to your (application's) health</a> and should be replaced.
</p>
<blockquote>
Everybody who writes object-oriented code knows about constructors. You need them so the program knows how to instantiate objects, right? And you especially need them when a lot of things have to be done while instantiating an object. [...] So why would I be skeptical of public constructors?
</blockquote>
<p>
The solution, as <a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=34&blogId=1">he sees it</a>, is to make a "constructor" that's actually called statically with parameters that returns an instance of the class it's in as well as performing the action. He argues that this can help make the code much more readable for some types of method calls.
</p>]]></description>
      <pubDate>Mon, 05 May 2008 10:21:33 -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[Hasin Hayder's Blog: Facebook data storage api can really be the replacement of memcache]]></title>
      <guid>http://www.phpdeveloper.org/news/9942</guid>
      <link>http://www.phpdeveloper.org/news/9942</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> has <a href="http://hasin.wordpress.com/2008/04/07/facebook-data-storage-can-really-be-the-replacement-of-memcache/">proposed an interesting replacement</a> for the usual caching mechanism - using the <a href="http://www.facebook.com">Facebook</a> data storage API to cache copies of pages/data/etc.
</p>
<blockquote>
Why not! All you need is a fast-n-furious caching storage for your Facebook application which stores values against a key, same like a hash table. Facebook data storage API does the same for you. using the batch API in Facebook rest client you can seriously think it as an alternative of memcache.
</blockquote>
<p>
He shows the simple process for making the object (manually in a preexisting application), inserting data into the object through the API they provide and how to pull that data back out.
</p>]]></description>
      <pubDate>Wed, 09 Apr 2008 13:58:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Tokenization using regular expression sub patterns]]></title>
      <guid>http://www.phpdeveloper.org/news/9449</guid>
      <link>http://www.phpdeveloper.org/news/9449</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog there's a <a href="http://www.sitepoint.com/blogs/2008/01/19/tokenization-using-regular-expression-sub-patterns/">new post</a> from <i>Harry Fuecks</i> talking about a replacement method using token that works a bit better than the typical regular expression method.
</p>
<blockquote>
Promtped by a real world example, one often-overlooked feature of most regular expressions engines is how subpatterns can useful to whip up tokenizers relatively easily. The problem? I needed to match the word any of the words "Canton", "Region" or "Group" in a string and perform a follow up action depending on which matched.
</blockquote>
<p>
His ultimate solution used a set of preg_match generated tokens to do the replaces a bit more reliably. It also makes it easy for other scripts (like his Python example) to use them too.
</p>]]></description>
      <pubDate>Fri, 18 Jan 2008 11:15:49 -0600</pubDate>
    </item>
  </channel>
</rss>
