3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements ArrayAccess { public function offsetSet($offset, $value) { var_dump($offset); } public function offsetGet($offset){} public function offsetUnset($offset){} public function offsetExists($offset){} } $test = new Test(); $test['1'] = true;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
188.29 ms | 2433 KiB | 9 Q