- print_r: documentation ( source)
<?php
class Test1 extends ArrayObject
{
}
class Test2 extends ArrayObject
{
function offsetGet($key) { return parent::offsetGet($key); }
}
$t1 = new Test1();
$t1['huba'] = array('one','two');
$t1['huba'][] = 'three';
print_r($t1);
$t2 = new Test2();
$t2['huba'] = array('one','two');
$t2['huba'][] = 'three';
print_r($t2);