3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($a, Env $b = null) { echo $a, "\n"; }; test('pouet'); test('pouet 2', 'wrong');
based on qv9po
Output for 7.1.0 - 7.2.0
pouet Fatal error: Uncaught TypeError: Argument 2 passed to test() must be an instance of Env or null, string given, called in /in/G00FL on line 5 and defined in /in/G00FL:3 Stack trace: #0 /in/G00FL(5): test('pouet 2', 'wrong') #1 {main} thrown in /in/G00FL on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
pouet Fatal error: Uncaught TypeError: Argument 2 passed to test() must be an instance of Env, string given, called in /in/G00FL on line 5 and defined in /in/G00FL:3 Stack trace: #0 /in/G00FL(5): test('pouet 2', 'wrong') #1 {main} thrown in /in/G00FL on line 3
Process exited with code 255.
Output for 5.2.0 - 5.6.28
pouet Catchable fatal error: Argument 2 passed to test() must be an instance of Env, string given, called in /in/G00FL on line 5 and defined in /in/G00FL on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.6
pouet Fatal error: Argument 2 passed to test() must be an object of class Env, called in /in/G00FL on line 5 and defined in /in/G00FL on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Argument 2 must not be null in /in/G00FL on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /in/G00FL on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /in/G00FL on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'&'' or `T_VARIABLE' or `T_CONST' in /in/G00FL on line 3
Process exited with code 255.