- var_dump: documentation ( source)
- current: documentation ( source)
<?php
class Foo {
public $foo = 'foo';
}
class Set extends ArrayIterator
{
public $bar = 'bar';
}
$array = [
new Foo(),
];
$set = new Set($array);
var_dump(current($set));