I notice something very different between java and php on interface, when you create the same methods in their interfaces.
PHP:
interface Visitor
{
public function visit(Visitable $Visitable);
public function visit(Visitable2 $Visitable2); // this is wrong in php.
}
Java:
interface Visitor
{
public double visit(Visitable Visitable);
public double visit(Visitable2 Visitable2); // this is ok in java
}
you can look at the check it out on this video at 3:35 for java.
how come java allows that? what does double
do anything? and no double
in php?