Rich Buggy

...Developer, CTO, Entrepreneur

dirname(__FILE__)

Written by Rich on March 24th, 2007

I was just reading the PHP 10.0 Blog when I saw a post called dirname(__FILE__). It’s a call for a new constant that provides the directory of the current file. Personally I think this is a brilliant idea and it shouldn’t be discouraged just because legacy applications will need to use dirname(__FILE__) instead of the new constant. Eventually those versions will disappear. After all, who still writes code that’s backwards compatible with PHP 3?

Let’s get this in now for PHP 6!!

You must be logged in to post a comment.