<?php class Test implements ArrayAccess { public function offsetGet($offset){ return gettype($offset); } public function offsetSet($offset, $value){} public function offsetUnset($offset){} public function offsetExists($offset){} } $a = array('a', 'b', 'c'); $o = new Test(); $s = '1'; echo $o[1], "\n"; // 'integer' echo $o['1'], "\n"; // 'integer' !? echo $o[1.0], "\n"; // 'double' echo $o[$s], "\n"; // 'string' echo $o[$o], "\n"; // 'object' echo $a[1], "\n"; // 'integer' echo $a['1'], "\n"; // 'integer' echo $a[1.0], "\n"; // 'integer' echo $a[$s], "\n"; // 'integer' echo $a[$o], "\n"; // Warning: Illegal offset type
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`