php-src/ext/spl/tests/bug62672.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

32 lines
504 B
PHP

--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)