PHP code example of leafo / lessphp
1. Go to this page and download the library: Download leafo/lessphp 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/ */
leafo / lessphp example snippets
s = new lessc;
echo $less->compile(".block { padding: 3 + 4px }");
echo $less->compileFile("input.less");
$less->checkedCompile("input.less", "output.css");
try {
$less->compile("invalid LESS } {");
} catch (exception $e) {
echo "fatal error: " . $e->getMessage();
}