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-- Incorrectly initialized SimpleXmlElement --EXTENSIONS-- simplexml --FILE-- <?php ..

Decoded Output download

--TEST--
Incorrectly initialized SimpleXmlElement
--EXTENSIONS--
simplexml
--FILE--
<?php

class MySXE extends SimpleXMLElement {
    public function __construct() {
        /* yolo */
    }
}

$sxe = new MySXE;
try {
    var_dump($sxe->count());
} catch (Error $e) {
    echo $e->getMessage(), "
";
}
try {
    var_dump($sxe->xpath(''));
} catch (Error $e) {
    echo $e->getMessage(), "
";
}
try {
    var_dump($sxe->getDocNamespaces());
} catch (Error $e) {
    echo $e->getMessage(), "
";
}
try {
    var_dump($sxe->children());
} catch (Error $e) {
    echo $e->getMessage(), "
";
}
try {
    var_dump($sxe->attributes());
} catch (Error $e) {
    echo $e->getMessage(), "
";
}
try {
    var_dump($sxe->registerXPathNamespace('', ''));
} catch (Error $e) {
    echo $e->getMessage(), "
";
}
try {
    var_dump($sxe->foo);
} catch (Error $e) {
    echo $e->getMessage(), "
";
}

?>
--EXPECT--
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized

Did this file decode correctly?

Original Code

--TEST--
Incorrectly initialized SimpleXmlElement
--EXTENSIONS--
simplexml
--FILE--
<?php

class MySXE extends SimpleXMLElement {
    public function __construct() {
        /* yolo */
    }
}

$sxe = new MySXE;
try {
    var_dump($sxe->count());
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump($sxe->xpath(''));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump($sxe->getDocNamespaces());
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump($sxe->children());
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump($sxe->attributes());
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump($sxe->registerXPathNamespace('', ''));
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}
try {
    var_dump($sxe->foo);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized
SimpleXMLElement is not properly initialized

Function Calls

None

Variables

None

Stats

MD5 338702840172029f001ca4c014c6fdab
Eval Count 0
Decode Time 105 ms