3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements \ArrayAccess { private $array_access = ['array_access'], $brace_access = ['brace_access']; public function __get ($offset) { return $this->brace_access[$offset]; } public function offsetGet ( $offset ) { return $this->array_access[$offset]; } public function offsetExists ( $offset ) {} public function offsetSet ( $offset , $value ) {} public function offsetUnset ( $offset ) {} } $foo = new Foo; echo $foo{0}; echo $foo[0];

This is an error 404

There are `0` results


preferences:
136.68 ms | 1399 KiB | 7 Q