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