- var_dump: documentation ( source)
<?php
class caster implements ArrayAccess{
function offsetGet($o){
return "ehy";
}
function offsetSet($a, $b){
return $b . "asdf";
}
function offsetUnset($a){
}
function offsetExists($a){
}
}
function c(){ return new caster; }
$fac = c()[1];// = 10 + 10;
var_dump($fac);