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-- Bug #62672 (Error on serialize of ArrayObject) --FILE-- <?php class ObjA { p..
Decoded Output download
--TEST--
Bug #62672 (Error on serialize of ArrayObject)
--FILE--
<?php
class ObjA
{
private $_varA;
public function __construct(Iterator $source)
{
$this->_varA = $source;
}
}
class ObjB extends ObjA
{
private $_varB;
public function __construct(ArrayObject $keys)
{
$this->_varB = $keys;
parent::__construct($keys->getIterator());
}
}
$obj = new ObjB(new ArrayObject());
var_dump($obj == unserialize(serialize($obj)));
?>
--EXPECT--
bool(true)
Did this file decode correctly?
Original Code
--TEST--
Bug #62672 (Error on serialize of ArrayObject)
--FILE--
<?php
class ObjA
{
private $_varA;
public function __construct(Iterator $source)
{
$this->_varA = $source;
}
}
class ObjB extends ObjA
{
private $_varB;
public function __construct(ArrayObject $keys)
{
$this->_varB = $keys;
parent::__construct($keys->getIterator());
}
}
$obj = new ObjB(new ArrayObject());
var_dump($obj == unserialize(serialize($obj)));
?>
--EXPECT--
bool(true)
Function Calls
None |
Stats
MD5 | 3faf92c1d2b70d77de9704af69a62e84 |
Eval Count | 0 |
Decode Time | 93 ms |