Fixed html tag writing for PHP versions without anonymous functions