| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/includes/classes/scssphp/ |
Upload File : |
#!/usr/bin/env php
<?php
error_reporting(E_ALL);
require "scss.inc.php";
$opts = getopt('hvTf:', array('help', 'version'));
function has() {
global $opts;
foreach (func_get_args() as $arg) {
if (isset($opts[$arg])) return true;
}
return false;
}
if (has("h", "help")) {
$exe = array_shift($argv);
$HELP = <<<EOT
Usage: $exe [options] < input-file
Options include:
-h, --help Show this message
-v, --version Print the version
-f=format Set the output format
-T Dump formatted parse tree
EOT;
exit($HELP);
}
if (has("v", "version")) {
exit(scssc::$VERSION . "\n");
}
$data = "";
while (!feof(STDIN)) {
$data .= fread(STDIN, 8192);
}
if (has("T")) {
$parser = new scss_parser("STDIN");
print_r($parser->parse($data));
exit();
}
$scss = new scssc();
if (has("f")) {
$scss->setFormatter($opts["f"]);
}
echo $scss->compile($data, "STDIN");