<?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, 21 Aug 2008 18:33:08 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHP 10.0 Blog: dirname(__FILE__)]]></title>
      <guid>http://www.phpdeveloper.org/news/7481</guid>
      <link>http://www.phpdeveloper.org/news/7481</link>
      <description><![CDATA[<p>
On the PHP 10.0 Blog today, <i>Stas</i> <a href="http://php100.wordpress.com/2007/03/21/dirname__file__/">has a suggestion</a> that might help out developers that use the combination "dirname(__FILE__)" to get the working directory. He proposes something like __FILEDIR__ to replace it and to help make code cleaner.
</p>
<blockquote>
The reason is simple - libraries want to include files relative to library top directory, and do not want to count on include path. And relative include resolution rules in PHP not clear to all, so people prefer to be sure. The downside here is that this expression is dynamic - executed at run-time. Meaning it's slower and less toolable and also makes a bad habit of putting dynamic things into include (which is not a problem here, since it's "static dynamic" thing, but still a bad habit).
</blockquote>
<p>
His <a href="http://php100.wordpress.com/2007/03/21/dirname__file__/">suggestion</a> has merit, and, according to the comments on the post, the reception seems like it would be positive. 
</p>]]></description>
      <pubDate>Thu, 22 Mar 2007 07:42:00 -0500</pubDate>
    </item>
  </channel>
</rss>
