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-- __sleep() returns properties clashing only after mangling --FILE-- <?php class Te..

Decoded Output download

--TEST--
__sleep() returns properties clashing only after mangling
--FILE--
<?php
class Test {
    private $priv;
    public function __sleep() {
        return ["Testpriv", "priv"];
    }
}
$s = serialize(new Test);
var_dump(str_replace("", '', $s));
?>
--EXPECTF--
Notice: serialize(): "priv" is returned from __sleep() multiple times in %s on line %d
string(37) "O:4:"Test":1:{s:10:"Testpriv";N;}"

Did this file decode correctly?

Original Code

--TEST--
__sleep() returns properties clashing only after mangling
--FILE--
<?php
class Test {
    private $priv;
    public function __sleep() {
        return ["\0Test\0priv", "priv"];
    }
}
$s = serialize(new Test);
var_dump(str_replace("\0", '\0', $s));
?>
--EXPECTF--
Notice: serialize(): "priv" is returned from __sleep() multiple times in %s on line %d
string(37) "O:4:"Test":1:{s:10:"\0Test\0priv";N;}"

Function Calls

None

Variables

None

Stats

MD5 1cd512cc0355016445a1c676cc306266
Eval Count 0
Decode Time 74 ms