Self-invoking functions in PHP
For a small PHP framework that I am refactoring, I needed to isolated variables from the framework in the output. Before, these variables could be called in the PHP templates, if you knew them (or guess them). Also $this was available because the templates are called inside a class. This can potentially introduce security issues,…