<?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, 09 Jul 2008 07:21:27 -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: Web scrapping in a smart way, making a "Today in History" object in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10063</guid>
      <link>http://www.phpdeveloper.org/news/10063</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> has written up a <a href="http://hasin.wordpress.com/2008/04/29/web-scrapping-in-a-smart-way-making-a-today-in-history-object/">quick tutorial</a> for his blog that shows how to create your own "Today in History" page with details from <a href="http://www.scopesys.com/">Scopesys</a> pulled with a little web scraping.
</p>
<blockquote>
There are thousands of services available on web who are presenting interesting as well as education information which you can really integrate in your web page or make a nice widget and let others use them seamlessly with their content delivery platforms. In this article I am going to show you how you can make a nice Today-in-History widget with the help of the data provided in <a href="http://www.scopesys.com/">Scopesys</a>.
</blockquote>
<p>
He wisely recommends that you check one thing first about the content you're grabbing - the copyright it carries with it. This could get you into big trouble down the line depending on whose content it is. The actual script is pretty simple - he defines some constants as markers for where things start and stop in the HTML and then uses strpos to get the locations for his substr call to grab the segments.
</p>]]></description>
      <pubDate>Tue, 29 Apr 2008 10:27:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: Another PHP bugbear…]]></title>
      <guid>http://www.phpdeveloper.org/news/9741</guid>
      <link>http://www.phpdeveloper.org/news/9741</link>
      <description><![CDATA[<p>
<i>Micheal Kimsal</i> has <a href="http://michaelkimsal.com/blog/?p=478">pointed out</a> another "bugbear" he's found in his work with PHP - this time it's with the use of class constants.
</p>
<blockquote>
My issue is not with the language itself (this time!) but how this sort of documentation is handled. Updating public documentation well ahead of a release creates confusion.
</blockquote>
<p>
He's referring to the documentation for the class constants not quite matching up with the current functionality (resulting in a T_PAAMAYIM_NEKUDOTAYIM). He wants consistency in the documentation and maybe references to what it requires to use a certain bit of code. 
</p>]]></description>
      <pubDate>Wed, 05 Mar 2008 19:08:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lars Strojny's Blog: New magic constant in PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/9691</guid>
      <link>http://www.phpdeveloper.org/news/9691</link>
      <description><![CDATA[<p>
In <a href="http://usrportage.de/archives/878-New-magic-constant-in-PHP-5.3.html">this new blog post</a> today, <i>Lars Strojny</i> talks about a new magic constant that will be joining its brothers in the upcoming PHP 5.3 release - __DIR__.
</p>
<blockquote>
In PHP 5.3 there will be another magic constant __DIR__. [...] To allow this, the internal function php_dirname() has been moved in the Zend Engine and is now called zend_dirname(). Nevertheless an alias still exists.
</blockquote>
<p>
__DIR__ will join the other constants (like __LINE__ and __FUNCTION__) to help give the currently running script a little introspection for things like its filename, what class it's currently in and now, what directory the file currently lives in.
</p>]]></description>
      <pubDate>Fri, 22 Feb 2008 15:02:00 -0600</pubDate>
    </item>
  </channel>
</rss>
