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-- Test __sleep returns non-array --FILE-- <?php class foo { private $private = ..

Decoded Output download

--TEST--
Test __sleep returns non-array
--FILE--
<?php
class foo
{
    private $private = 'private';
}

class bar extends foo
{
    public function __sleep()
    {
        return (new bar());
    }
}

serialize(new bar());
?>
--EXPECTF--
Warning: serialize(): bar::__sleep() should return an array only containing the names of instance-variables to serialize in %s on line %d

Did this file decode correctly?

Original Code

--TEST--
Test __sleep returns non-array
--FILE--
<?php
class foo
{
    private $private = 'private';
}

class bar extends foo
{
    public function __sleep()
    {
        return (new bar());
    }
}

serialize(new bar());
?>
--EXPECTF--
Warning: serialize(): bar::__sleep() should return an array only containing the names of instance-variables to serialize in %s on line %d

Function Calls

None

Variables

None

Stats

MD5 30250da0217ed7fa0d33a0db5c84fe1a
Eval Count 0
Decode Time 110 ms