<?php class foo { const file_name = __FILE__; } // will print current file name echo foo::file_name; ?>