ウェブfree, open source. What is Smarty? Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation. Templates: Two camps of thought. When it comes to templating in PHP, there are basically two camps of thought.