facebook/hhvm — pull request #1201 by davedevelopment (2013-10-20 21:36:55+00:00)
Title: Test case for resolving absolute paths for magic constants

This is the best I could come up with to showcase the issue.

The [PHP Manual](http://php.net/manual/en/language.constants.predefined.php) states:

> \_\_FILE\_\_	The full path and filename of the file. If used inside an include, the name of the included file is returned. Since PHP 4.0.2, \_\_FILE\_\_ always contains an absolute path with symlinks resolved whereas in older versions it contained relative path under some circumstances.
> \_\_DIR\_\_	The directory of the file. If used inside an include, the directory of the included file is returned. This is equivalent to dirname(\_\_FILE\_\_). This directory name does not have a trailing slash unless it is the root directory. (Added in PHP 5.3.0.)

If I'm correct, I'll somehow get the CLA scanned (would a hi-res photo do?) and would be happy to dive in to the code and try and fix it.