That's different. eval() does indeed parse everything as PHP code. fetch_template() parses templates from the conditionals to proper PHP code which can be understood. We are concatenating fetch_template()'s output to $navbar, what you suggest is concatenating fetch_template()'s output to the end of navbar, and what will be concatenated will be the PHP code that fetch_template() outputs, and that will not be parsed by eval().