mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
19 lines
429 B
PHP
19 lines
429 B
PHP
--TEST--
|
|
DomDocument::createEntityReference() - DOM_INVALID_CHARACTER_ERR raised if name contains an invalid character
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
$objDoc = new DomDocument();
|
|
|
|
try {
|
|
$objDoc->createEntityReference('!');
|
|
} catch (Throwable $e) {
|
|
var_dump($e->getCode() === DOM_INVALID_CHARACTER_ERR);
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
DOMException: Invalid Character Error
|