3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Hello { public static function say(Hello $name) { return "hello " . $name; } } echo Hello::say('Eyal');
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught TypeError: Argument 1 passed to Hello::say() must be an instance of Hello, string given, called in /in/oXktl on line 9 and defined in /in/oXktl:4 Stack trace: #0 /in/oXktl(9): Hello::say('Eyal') #1 {main} thrown in /in/oXktl on line 4
Process exited with code 255.
Output for 5.2.14 - 5.6.28
Catchable fatal error: Argument 1 passed to Hello::say() must be an instance of Hello, string given, called in /in/oXktl on line 9 and defined in /in/oXktl on line 4
Process exited with code 255.