3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo implements ArrayAccess { protected $array(); public function offsetExists($key) { } public function offsetGet($key) { } public function offsetSet($key, $value) { } public function offsetUnset($key) {} } $foo = new Foo; $foo['bar'] = 'bar'; var_dump($foo['bar']);
Output for 5.3.0 - 5.4.11
Parse error: syntax error, unexpected '(', expecting ',' or ';' in /in/Bf46f on line 6
Process exited with code 255.