Mantis - Quercus
Viewing Issue Advanced Details
3253 major always 01-14-09 11:18 01-15-09 20:37
haplo  
ferg  
normal  
closed  
fixed  
none    
none 4.0.0  
0003253: get_object_vars respects IteratorAggregate but should not
class A implements IteratorAggregate {

    private $data = array("one", "two", "three");

    private $foo= "bar";

    public function getIterator(){
        return new ArrayIterator($this->data);
    }

    public function getVars(){
        return get_object_vars($this);
    }
}

$a = new A;

foreach($a as $key => $value){
    echo "$key => $value
";
}

$vars = $a->getVars();
foreach($vars as $key => $value){
    echo "$key => $value
";
}

Result apache:
0 => one
1 => two
2 => three
data => Array
foo => bar

Result quercus:
0 => one
1 => two
2 => three
0 => one
1 => two
2 => three

Notes
(0003743)
ferg   
01-15-09 20:37   
php/4as7