3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = []; function foo(ArrayAccess $bar) {}; var_dump(foo($x));
based on 40Qnb
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught TypeError: Argument 1 passed to foo() must implement interface ArrayAccess, array given, called in /in/Q409L on line 7 and defined in /in/Q409L:5 Stack trace: #0 /in/Q409L(7): foo(Array) #1 {main} thrown in /in/Q409L on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Catchable fatal error: Argument 1 passed to foo() must implement interface ArrayAccess, array given, called in /in/Q409L on line 7 and defined in /in/Q409L on line 5
Process exited with code 255.