Edin Kadribasic wrote:
Stanislav Malyshev wrote:
The vote is should OO strictness (fatal error on changing function arguments in derived classes in this case) be removed or kept.

I think fatal error should be definitely removed or the rules be at least relaxed sufficiently to accomodate for PHP flexibility - e.g., () should be allowed to be overriden with ($a, $b, $c), etc. In light of technical difficulty to implement sufficiently flexible cheks, I would not mind removing them altogether or demoting them to very low priority notice.

Yes, it was my opinion as well that E_NOTICE would be the most appropriate choice here.

Hate to have to reply to myself, but to clarify.

I believe that most OO "strictness" fatal errors should be demoted to notices.

* Changing function signatures in derived classes
* Accessing non-existing class constant (print myclass::myconst)
* Creating class variables (myclass::$myvar = 1)

The last two exist in non-OO versions and there accessing a non-existing constant is a E_NOTICE and you don't have to declare variables at all, so I guess we should not take 180 degree turn in their OO equivalents.

Edin

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

Reply via email to