3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Specification {} trait Specifications {} class Eh implements Specification { use Specifications; } function testing(Specifications $s) {} testing(new Eh);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to testing() must be an instance of Specifications, instance of Eh given, called in /in/mDMV0 on line 13 and defined in /in/mDMV0:11 Stack trace: #0 /in/mDMV0(13): testing(Object(Eh)) #1 {main} thrown in /in/mDMV0 on line 11
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Catchable fatal error: Argument 1 passed to testing() must be an instance of Specifications, instance of Eh given, called in /in/mDMV0 on line 13 and defined in /in/mDMV0 on line 11
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/mDMV0 on line 4
Process exited with code 255.