Blog :: It's Magic
Via phpdeveloper.org I saw this little blog post which notes that in an upcoming PHP 5.3 release a new constant '__DIR__' will be defined. Pretty obviously this is the directory equivalent of "__FILE__".
I know this doesn't seem like much of a feature but it actually makes me happy - a lot of my one-off PHP scripts start with:
since I'm likely doing things like loading files from or looping over a relative directory... Not earthshaking, but does nicely reflect PHP's pragmatic impulses.