3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface IModel { } abstract class AModel implements IModel { } abstract class ARepository { public function delete(IModel $model){ } } interface IAttachment extends IModel { } class Attachment extends AModel implements IAttachment { } class AttachmentRepository extends ARepository { public function delete(IAttachment $model) { } } $attachment = new Attachment(); $attachmentRepository = new AttachmentRepository(); $attachmentRepository->delete($attachment);
Output for 7.0.0 - 7.3.0rc3
Warning: Declaration of AttachmentRepository::delete(IAttachment $model) should be compatible with ARepository::delete(IModel $model) in /in/liVF1 on line 29
Output for hhvm-3.18.5 - 3.22.0
Output for 5.6.0 - 5.6.30
Strict Standards: Declaration of AttachmentRepository::delete() should be compatible with ARepository::delete(IModel $model) in /in/liVF1 on line 29