Now that was a quick reply :) > Also known as runtime inheritance, or late binding. It's not a new > thing, we have it today. The discussion was about whether to > have a way ...
That is, one can write if (...) class A extends X {} else class A extends Y {} right now? Seriously ;)? Every now and then I'm surprised what weird sort of stuff is allowed in PHP :), but most probably you don't really want to write this sort of code in the first place? ;) > Just like any other signature in an instance, it tells anything that > implements the interface that it must have a constructor and that > constructor must meet the definition in the interface. Useful for > object factories. In most cases you don't want to force a specific > constructor in which case you wouldn't specify it in the > interface, but > I see no reason why you shouldn't be allowed to specify it > there if you > want to. The point is that interfaces are nothing you could anything with - that is, if you have "something" that implements an interface, it has already been constructed. You never construct instances through an interface (you would have to choose an implementation, the interface isn't one)... I just cannot explain it in a better way ;) It's somewhat similar to that you cannot make static calls on interfaces. Maybe someone could explain what they intend to use it for and what they suspect it to do ;)? -mp. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php