<?php
interface Comparable {
function compare(self $compare);
}
class Foo implements Comparable {
function compare(Comparable $compare) {}
}
class Bar implements Comparable {
function compare(Comparable $compare) {}
}
$foo = new Foo();
$bar = new Bar();
$foo->compare($foo);
$bar->compare($bar);
Fatal error: Declaration of Foo::compare() must be compatible with Comparable::compare(self $compare) in /in/LL1DG on line 7
Process exited with code 255.