Here is an example of how to compile a file:
$lines = [];
exec("lessc $file", $lines, $status);
$output = implode("", $lines);
I would like to compile just a string ideally without creating a temporary file, writing to it, and then calling exec to compile that file. My unix skills aren't that great so I tried variations of this which doesn't work:
$lines = [];
exec("lessc < \"$string\"", $lines, $status);
$output = implode("", $lines);