PHP code example of splitbrain / lesserphp

1. Go to this page and download the library: Download splitbrain/lesserphp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

splitbrain / lesserphp example snippets



s = new LesserPHP\Lessc;
echo $less->compile(".block { padding: 3 + 4px }");


echo $less->compileFile("input.less");


try {
  $less->compile("invalid LESS } {");
} catch (LesserPHP\ParserException $e) {
  echo $e->getMessage();
}