CSS LESS Compiler in PHP

Here is a LESS Compiler written in PHP. When I read about this first time and glanced through the documentation then I liked these things:

Loved this checkedCompile() method which will check if file is already compiler or not !

$less->checkedCompile("input.less", "output.css");

If the file is compiled but older than it also it will compiler. Perfect thought for live site.

Need to check for stability and what it does if wrong LESS code is written. It generates exception but does it avoid writing to existing file so that older css works as was working!

This was when I checked first time. Today, I checked online tool they have provided and that is also working great. It has passed in one mixins which was failing at less2css.org earlier but has failed in another LESS code.

The code where it has failed was a mixins for generating heading (<h1> to <h6>).

LESS Mixin Code for generating Heading font-size in relative to each other:


// Headings h1 - h6. Sets font-size, line-height and letter-spacing
.heading-size(@font-size-base:0.9em, @size-increment:10) {
    @h6: 100 + @size-increment/1.5;
    @h5: @h6 + @size-increment/1.5;
    @h4: @h5 + @size-increment/1.5;
    @h3: @h4 + @size-increment;
    @h2: @h3 + @size-increment;
    @h1: @h2 + @size-increment;
    h6 {
        font-size: round((@font-size-base *@h6)/100, 2);
    }
    h5 {
        font-size: round((@font-size-base *@h5)/100, 2);
    }
    h4 {
        font-size: round((@font-size-base *@h4)/100, 2);
    }
    h3 {
        font-size: round((@font-size-base *@h3)/100, 2);
    }
    h2 {
        font-size: round((@font-size-base *@h2)/100, 2);
    }
    h1 {
        font-size: round((@font-size-base *@h1)/100, 2);
    }
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.1;
    }
    h1,h2,h3 {
        letter-spacing: @letter-spacing-base;
    }
    h4,h5,h6 {
        letter-spacing: @letter-spacing-medium;
    }
}
.heading-size();

It has issued an Error:
Fatal Error:
====================
expecting number: failed at `font-size: round((@font-size-base *@h6)/100, 2);` line: 14

This LESS Online tool has passed. It is correctly telling that:
variable @letter-spacing-base is undefined. You can use the above code by defining that variable anywhere in file. I have defined in variables.less file. http://less2css.org/ was down when I was testing that.