1--TEST--
2DOMEntityReference - DOM_INVALID_CHARACTER_ERR raised if name contains an invalid character
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7try {
8    new DOMEntityReference('!');
9} catch (DOMException $e) {
10    var_dump($e->getCode() === DOM_INVALID_CHARACTER_ERR);
11    echo $e->getMessage();
12}
13?>
14--EXPECT--
15bool(true)
16Invalid Character Error
17