hotfix: adding static keywords and fixing passed by reference errors in php 5.4 strict mode