Nope. The final decision was to only check this during E_STRICT because there's no reason why inheritance should be different from implementation. People here felt that due to PHP not supporting function overloading we should not be very strict, and therefore, only give this warning in E_STRICT.
I don't want to reopen this decision because as you can see in the archives, it was a long thread :)
Andi


At 07:16 AM 3/17/2004 -0500, Hans Lellelid wrote:
Hi -

Andi Gutmans wrote:
Only if you use E_STRICT. There was a long discussion about this on internals@ a few weeks ago.
At 11:57 AM 3/17/2004 +0100, Clemens Gutweiler wrote:



<?php


        interface person {
                function wakeup( $day, $time );
        }

        class hugo implements person {
                function wakeup( $day ) {
                        printf( "wake up on $day\n" );
                }
        }

        $hugo = new hugo;
        $hugo->wakeup( 'monday' );

?>

Shouldn't this throw an fatal error because wakeup isn't complete
implemented?

I must have missed / mis-understood the final decision on that. I would have also expected that this code would still be raising E_FATAL. I thought that the decision to not enforce strict signatures was for class inheritance (becuase of common practice of overriding parent signatures in PHP4), but that interfaces would enforce signatures (but might allow for additional optional params in methods of implementing classes).


Hans

-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to