lkrubner@geocities.com (lawrence) wrote in message news:<da7e68e8.0310140020.ff5df7e@posting.google.c om>...[color=blue]
> Do interfaces enforce how many arguments can be passed to a method? If
> two classes inherit from the same interface, can one have
> formatThisText($text) and another have formatThisText($text,
> $formatter) ??? I'm assuming the answer is yes, interfaces do enforce
> the number of arguments.[/color]
Thank you for the reply. That is what I would expect in Java. Does
anyone know the answer for PHP 5.0? Or where that information is
documented? I noticed a bunch of very interesting articles here
(though they didn't answer my question):
http://www.zend.com/zend/php5/index.php
PHP is truly become a script version of Java, with a nearly complete
imitation of Java's object features, minus strict typing.
Still, I'm wondering about interface enforcement in PHP 5.0 and can't
find an answer.
Another question I have is can an argument passed to a method have a
default value in one object but a different default value, or none, in
another object if both inherit from the same interface?