3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface SomeSerializableTrait {} interface SomeResizableInterface {} class SomeContainer implements SerializableInterface, IterableInterface { use SomeSerializableTrait; } class SomeOtherContainer extends SomeContainer implements SomeResizableInterface {} $someContainer = new SomeContainer; $someOtherContainer = new SomeAnotherContainer; var_dump($someContainer instanceof SerializableInterface); var_dump($someOtherContainer instanceof SerializableInterface); var_dump($someOtherContainer instanceof SomeSerializableTrait);
based on WXFmd
Output for 7.0.6 - 7.2.0
Fatal error: SomeContainer cannot use SomeSerializableTrait - it is not a trait in /in/sqsI1 on line 6
Process exited with code 255.
Output for 5.4.1 - 7.0.5
Fatal error: Interface 'SerializableInterface' not found in /in/sqsI1 on line 5
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in /in/sqsI1 on line 6
Process exited with code 255.