Emil Ivanov wrote:
> class C1 {}
> class C2 extends C1 {}
>
> abstract class Work1 {
> public function f1(C1 $c);
> }
>
> class Work2 extends Work1 {
> public function f1(C2 $c);
> }
Strange thing is I don't get any error message here, although there definitely
should be one.
PHP 5.2.2-pl1-gentoo (cli) (built: May 21 2007 12:36:57)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
And regarding your code - it should work the other way round - you can only
loose preconditions and tighten postconditions, which is a result of
substituion rule already mentioned by Stanislav.
--
Paweł Stradomski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php