- var_dump: documentation ( source)
<?php
class test implements arrayaccess
{
public function offsetSet($offset, $value) {
var_dump($offset);
var_dump($value);
}
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
}
$test = new test();
$test->a[5] = 12345;