An Interface with Abstract Methods
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 stupid and showed another co-worker sitting next to me. We laughed but then started to ask each other if it was possible and if so if it was actually useful. Apparently it is not possible (see example below), but if it was possible would it be useful. Can you think of situations where this could be useful? <?php interface Itest { abstract public function add(int $x, int $y); } abstract class ParentTest implements Itest