3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements \ArrayAccess { private $array_access = array('array_access'), $brace_access = array('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} . PHP_EOL; echo $foo[0];

This is an error 404

There are `0` results


preferences:
143.28 ms | 1399 KiB | 7 Q