NRPC/nrpc_site/dompdf/lib/php-css-parser/tests/quickdump.php

21 lines
438 B
PHP
Raw Permalink Normal View History

2021-06-27 22:45:20 +00:00
#!/usr/bin/env php
<?php
require_once(dirname(__FILE__).'/bootstrap.php');
$sSource = file_get_contents('php://stdin');
$oParser = new Sabberworm\CSS\Parser($sSource);
$oDoc = $oParser->parse();
echo "\n".'#### Input'."\n\n```css\n";
print $sSource;
echo "\n```\n\n".'#### Structure (`var_dump()`)'."\n\n```php\n";
var_dump($oDoc);
echo "\n```\n\n".'#### Output (`render()`)'."\n\n```css\n";
print $oDoc->render();
echo "\n```\n";