PHPackages                             hamlphp/hamlphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hamlphp/hamlphp

ActiveLibrary

hamlphp/hamlphp
===============

Yet another Haml to HTML converter written in PHP.

036PHP

Since Jan 19Pushed 11y ago1 watchersCompare

[ Source](https://github.com/xedp3x/HamlPHP)[ Packagist](https://packagist.org/packages/hamlphp/hamlphp)[ RSS](/packages/hamlphp-hamlphp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

HamlPHP
=======

[](#hamlphp)

Yet another Haml to HTML converter written in PHP.

Check the [Wiki](https://github.com/hamlphp/HamlPHP/wiki) we've been adding some docs.

Requirements
------------

[](#requirements)

PHP 5.2 or newer.

Usage
-----

[](#usage)

The simplest way to use HamlPHP is to manually. You can use mod\_rewrite to redirect all your requests to index.php and render the .haml files from there. We'll add this example later. HamlPHP will cache compilation results, so the .haml file is only compiled to php once.

index.haml

```
!!! 5
%html
    %body
        #container
            %ul.navigation
                %li Etusivu
                %li Tuotteet

            %h2 Tuotteet
            %ul.products
                - for ($i = 0; $i < 10; $i++)
                    %li= $i * 7
```

In your index.php

```
