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