An Interface with Abstract Methods

前端 未结 2 516
眼角桃花
眼角桃花 2021-01-26 07:48

I came across some PHP code that was written by a co-worker (it was not used for anything). Basically it was an interface containing abstract methods. I then said that this was

2条回答
  •  攒了一身酷
    2021-01-26 08:48

    No, it's not useful. He should either use abstract classes or just plain interfaces.

    Interface methods are basically abstract anyway, so having abstract interface methods doesn't make much sense.

提交回复
热议问题