I've got kind of a wierd security hole I'm trying to plug - and the easiest fix would be if I could find some way to find out exactly what function is calling another. For example: function runme() { if (__fill_in_the_blank____!='main') die; } function main() { runme(); } Code (markup): Since php has no function overloading on normal functions, this would really make it simpler. (and no, private will not do the job) Any ideas, or is this just wishful thinking?