3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function __set($name, array $value) { } } $a = new A; $a->foo = 2;
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 2 passed to A::__set() must be of the type array, integer given in /in/eoJLf:5 Stack trace: #0 /in/eoJLf(12): A->__set('foo', 2) #1 {main} thrown in /in/eoJLf on line 5
Process exited with code 255.
Output for 5.4.1 - 5.6.28
Catchable fatal error: Argument 2 passed to A::__set() must be of the type array, integer given in /in/eoJLf on line 5
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Catchable fatal error: Argument 2 passed to A::__set() must be an array, integer given in /in/eoJLf on line 5
Process exited with code 255.