mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
add some tests and iconv support
This commit is contained in:
@@ -2,4 +2,9 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(class_exists('\\DOMDocument') ? 0 : 1);
|
||||
if (!class_exists('\\DOMDocument')) {
|
||||
exit(1);
|
||||
}
|
||||
$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);
|
||||
|
||||
Reference in New Issue
Block a user