<?php
class ArrayWrapper extends ArrayObject {
public function offsetSet($offset, $value) {
parent
::offsetSet($offset, is_array($value) ?
new ArrayWrapper
($value) : $value); }
}
$a = new ArrayWrapper();
PD9waHAKCmNsYXNzIEFycmF5V3JhcHBlciBleHRlbmRzIEFycmF5T2JqZWN0IHsKICAgIHB1YmxpYyBmdW5jdGlvbiBvZmZzZXRTZXQoJG9mZnNldCwgJHZhbHVlKSB7CiAgICAgICAgcGFyZW50OjpvZmZzZXRTZXQoJG9mZnNldCwgaXNfYXJyYXkoJHZhbHVlKSA/IG5ldyBBcnJheVdyYXBwZXIoJHZhbHVlKSA6ICR2YWx1ZSk7CiAgICB9Cn0KCiRhID0gbmV3IEFycmF5V3JhcHBlcigpOwokYVsnYiddID0gYXJyYXkoJ2MnPT5hcnJheSgnZCcpKTsKcHJpbnRfcigkYSk7CnVuc2V0KCRhWydiJ11bJ2MnXSk7CnByaW50X3IoJGEpOw==