3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo implements ArrayAccess { public function offsetSet(string $offset, string $value) { // } public function offsetExists(string $offset) { // } public function offsetUnset(string $offset) { // } public function offsetGet(string $offset) { // } }
based on OmtBu
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of Foo::offsetExists(string $offset) must be compatible with ArrayAccess::offsetExists($offset) in /in/o2dIL on line 3
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Declaration of Foo::offsetExists() must be compatible with ArrayAccess::offsetExists($offset) in /in/o2dIL on line 4
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Fatal error: Declaration of Foo::offsetExists() must be compatible with that of ArrayAccess::offsetExists() in /in/o2dIL on line 4
Process exited with code 255.