PHP 5 allows class specific constants, which works just like regular constants, but are limited to the scope of the given class.
<?php
class foo {
    const 
file_name __FILE__;
}

// will print current file name
echo foo::file_name;
?>