add readline support

This commit is contained in:
crazywhalecc
2023-04-30 15:43:08 +08:00
parent b3296842b7
commit 2d597ed690
15 changed files with 54 additions and 19 deletions

View File

@@ -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');