3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
29.94 ms | 402 KiB | 5 Q