PHP code example of marcusschwarz / lesserphp
1. Go to this page and download the library: Download marcusschwarz/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/ */
marcusschwarz / lesserphp 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();
}