What is HAML-TO-PHPExamples
- HAML-to-PHP is a (proprietary) PHP implementation of the HAML language which is a template system with a very expressive and concise syntax. Basically its a domain specific language for writing HTML including dynamic content
- HAML-to-PHP compiles .haml to native .php code offering a maximum of performance
- based on a minimalistic parser engine preventing lock in especially when customizing HAML's syntax.
- a library used in production
Why using HAML:
Advantages over HTML, Smarty, plain old PHP (which could be called a bloated template engine itself)
- proper HTML quoting and escaping always.
- Python like indentation: tags are closed when indentation decreases. This means HAML is always easy to read
- less to type
- CSS like selectors such as .class_name or .id_value are enough to desrcibe a div element
- opening and closing tags always match because you write %tag only instead of <tag></tag>.
- is so easy to write that it can replace the need for WYSIWYG editors such as FCK.
Site note: I recommend you using Ruby or the like anyway.