mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 16:25:39 +08:00
add readline support
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/** @noinspection PhpComposerExtensionStubsInspection */
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (!class_exists('\\DOMDocument')) {
|
||||
exit(1);
|
||||
}
|
||||
assert(class_exists('\\DOMDocument'));
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHtml("<html><head><meta charset=\"UTF-8\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body id='app'>Hello</body></html>");
|
||||
exit($doc->getElementById('app')->nodeValue === 'Hello' ? 0 : 1);
|
||||
assert($doc->getElementById('app')->nodeValue === 'Hello');
|
||||
|
||||
Reference in New Issue
Block a user