Contents of file echoed to screen and not executed
===

I've been getting this error on my MediaWiki installation, but I'm not sure it's too localized to MediaWiki.

When including (or requiring, or using other methods) a file in a PHP script, I'm getting this:

    class aClass() { }                               //Contents of file
    Fatal error: Class 'aClass' not found in /path/path/file.php on line 9

`aClass` is just a test, and as you can see, it's not being loaded.

`aClass` is defined in the file I'm including. (This file is the one being echoed.)

This is the file that does the requiring:

    $dir = dirname(__FILE__) . '/';

    $wgAutoloadClasses['RatingData'] = $dir . 'RatingDataClass.php';
    //MediaWiki class-loading statement

    include $dir . 'RatingDataClass.php'; 
    //simple include still fails

    new aClass();

Without the `new aClass();`, the page loads fine, no errors or anythin abnormal echoed.