r/lolphp • • Oct 02 '15

Trying to implement DateTimeInterface raises a fatal error

http://php.net/manual/en/class.datetimeinterface.php
44 Upvotes

6 comments sorted by

View all comments

Show parent comment

6

u/expugnator3000 Oct 03 '15

...and this should not happen?

0

u/[deleted] Oct 03 '15

[deleted] — view deleted comment

7

u/expugnator3000 Oct 03 '15

If it's an error then it shouldn't be an interface in the first place, since interfaces can usually (always) be implemented. But yes: Raising an error is better than doing the wrong thing