MB>> Consider you defined a container (list, vector what ever) and want MB>> to derive from it. Then there is *really*no* need to override methods MB>> like "insert" or "remove". You may want to have additional things like MB>> "insert_if" or whatever. But for the container part "insert" must stay as MB>> it is and that requires static binding.
Well, if there is *really no need*, why one would override it? Obviously, if one overrides it, there's a need? I don't see why container writer should care if anyone overrides the method. Could you bring a real example where one needs non-overridable methods? Only thing I can think of are various Java security classes (like class loaders, etc.) which if you succeed to override various checking hooks may lead to trouble. But we don't have such things in PHP... For example, what if I want to create "secure container", where insert can be done only after you called password() function for the container with right password? Your 'finalized' container would not allow me to do it. MB>> And here comes "final" as it allows to emulate static binding with MB>> dynamic binding. If you declare a function "final" it is invariant MB>> against inhertance starting from that point in the inhertance tree. In Could you explain what is "invariant against inhertance"? What should happen if I define function with the same name in derived class - is this a compile error? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.109 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php