Is a PHP script able to detect if it's being included in another one or being called directly? Python has a neat little trick:
if __name__ == "__main__":
that allows it to tell if the module is being run directly or if it's being imported. I want to write a bit of PHP that assigned it's output to a variable if it's being included in another, but echos the output if it's being called directly.
thanks