DEV Community

Discussion on: Would you recommend using Template Engine for PHP?

Collapse
 
ssmusoke profile image
Stephen Senkomago Musoke

I would suggest you go for Twig, if I remember well you can build your templates using the Twig syntax or even PHP

But go for templates as they are reusable (can have different parts built together), inheritable (you can have a master template and keep overriding different parts) and performant (as good as PHP code)

No need to have HTML, CSS or JS in your controllers

PS: The templates are supported in your regular IDE like PhpStorm, Atom, Visual Studio code with autocomplete etc

Collapse
 
theoretician profile image
theoretician

Thank you, Stephan, for the thoughts!