3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface I{ function __construct(array $test); } trait T{ function __construct(array $test){ } } class Mother implements I{ use T; } class Children extends Mother{ function __construct(){ } } $children=new Children();
Output for 7.0.6 - 7.1.0
Fatal error: Declaration of Children::__construct() must be compatible with I::__construct(array $test) in /in/ZSLU6 on line 16
Process exited with code 255.
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.0.5
Output for hhvm-3.12.0
Fatal error: Uncaught Error: Declaration of Children::__construct() must be compatible with that of I::__construct() in /in/ZSLU6:16 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: Declaration of Children::__construct() must be compatible with that of I::__construct() in /in/ZSLU6 on line 16
Process exited with code 255.
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/ZSLU6 on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/ZSLU6 on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/ZSLU6 on line 2
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 in /in/ZSLU6 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ZSLU6 on line 2
Process exited with code 255.