<?php class A implements ArrayAccess { function offsetGet($a){ return new A; } function offsetExists($a){ echo "exists"; if($a === 10){ return true; }else{ return false; } } function offsetSet($a, $b){} function offsetUnset($a){} } $x = new A; var_dump($x[10][20] ?? 20);
You have javascript disabled. You will not be able to edit any code.