Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- DomDocument::createEntityReference() - DOM_INVALID_CHARACTER_ERR raised if name c..

Decoded Output download

--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 (DOMException $e) {
    var_dump($e->getCode() === DOM_INVALID_CHARACTER_ERR);
    echo $e->getMessage();
}
?>
--EXPECT--
bool(true)
Invalid Character Error

Did this file decode correctly?

Original Code

--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 (DOMException $e) {
    var_dump($e->getCode() === DOM_INVALID_CHARACTER_ERR);
    echo $e->getMessage();
}
?>
--EXPECT--
bool(true)
Invalid Character Error

Function Calls

None

Variables

None

Stats

MD5 7e7f852959b484f9429b887e8d3e47c0
Eval Count 0
Decode Time 90 ms