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!!
This site contains my personal ramblings on Linux, PHP, Java, .NET and anything else that I feel is important.