<?php class SpecialArray implements \ArrayAccess { public function offsetExists($index){} public function offsetGet($index){} public function offsetSet($index, $value){} public function offsetUnset($index){} } $arr = new SpecialArray; $arr[] = 1; $arr[] = 2; $arr[] = 3; var_dump(count($arr));
You have javascript disabled. You will not be able to edit any code.