▲ | yurishimo 2 days ago | |
Templating languages in PHP are largely about better ergonomics. Sure, you can have your own helper functions that do the html escaping or an abstraction layer to pass variables into includes without polluting global variable scope, but that’s all boilerplate. Twig and Blade are both fine templating engines with their own quirks and features but they’re also battle tested and have proven their use over the past decade+. If someone wants to use a dedicated templating language for abstracting away chunks of HTML, it’s low on my list of complaints. |