<?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>Tue, 08 Jul 2008 23:57:10 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHP in Action Blog: I want enums in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10159</guid>
      <link>http://www.phpdeveloper.org/news/10159</link>
      <description><![CDATA[<blockquote>I want Enums in PHP</blockquote>
<p>
That's how <a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=36&blogId=1">this new post</a> on the PHP in Action blog starts this morning. The one thing that he wants is enumeration support in PHP. He shows how it can currently come close with a "roles" system:
</p>
<blockquote>
Useful examples I've encountered in web programming are states or stages in a process and user roles. Another kind of example is one I used in PHP In Action: an authorization system with three fixed roles or categories of user: regular, webmaster and administrator.
</blockquote>
<p>
He sets up an example class that sets constants for the different access levels rather than just relying on strings to handle it (which, as he points out, could very easily be misspelled and not throw any kind of error) .
</p>]]></description>
      <pubDate>Mon, 12 May 2008 08:41:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Hasin Hayder's Blog: Unexpected return value from Facebook FQL.query via PHP REST Lib]]></title>
      <guid>http://www.phpdeveloper.org/news/9653</guid>
      <link>http://www.phpdeveloper.org/news/9653</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> had been <a href="http://hasin.wordpress.com/2008/02/16/unexpected-return-value-from-facebook-fqlquery-via-php-rest-lib/">working with the Facebook API</a> and stumbled across a bug in an application they had created for the social networking site:
</p>
<blockquote>
The method which we used to count number of friends of a specific user who has added that application was returning 1 when there is no friend actually installed it.
</blockquote>
<p>
He gives the SQL query and the PHP code he was originally using to find out the number of users for the application. The problem came from the fact that the returning value wasn't an array - it was a string. The corrected code (that checks for array-ness) is also included.
</p>]]></description>
      <pubDate>Mon, 18 Feb 2008 12:06:00 -0600</pubDate>
    </item>
  </channel>
</rss>
