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-- ReflectionClass::__constructor() --FILE-- <?php $r1 = new ReflectionClass("stdCla..

Decoded Output download

--TEST--
ReflectionClass::__constructor()
--FILE--
<?php
$r1 = new ReflectionClass("stdClass");

$myInstance = new stdClass;
$r2 = new ReflectionClass($myInstance);

class TrickClass {
    function __toString() {
        //Return the name of another class
        return "Exception";
    }
}
$myTrickClass = new TrickClass;
$r3 = new ReflectionClass($myTrickClass);

var_dump($r1, $r2, $r3);
?>
--EXPECTF--
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(8) "stdClass"
}
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(8) "stdClass"
}
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(10) "TrickClass"
}

Did this file decode correctly?

Original Code

--TEST--
ReflectionClass::__constructor()
--FILE--
<?php
$r1 = new ReflectionClass("stdClass");

$myInstance = new stdClass;
$r2 = new ReflectionClass($myInstance);

class TrickClass {
    function __toString() {
        //Return the name of another class
        return "Exception";
    }
}
$myTrickClass = new TrickClass;
$r3 = new ReflectionClass($myTrickClass);

var_dump($r1, $r2, $r3);
?>
--EXPECTF--
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(8) "stdClass"
}
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(8) "stdClass"
}
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(10) "TrickClass"
}

Function Calls

None

Variables

None

Stats

MD5 8613f48741d3002aaa386a0c61327ff5
Eval Count 0
Decode Time 100 ms