On Apr 20, 2004, at 11:39 AM, Ferdinand Beyer wrote:
On 20 Apr 2004 at 11:22, George Schlossnagle wrote:
PHP doesn't support this, regardless of you being able to tell them apart, scalar types in PHP are isomorphic.
Yes, I know. This is why I am against strict parameter checking.
Everything works fine if you except that 'scalar' is a base type and that int, string, etc. are not.
interfaceProvided that one has access to the interfaces...
I must not understand this comment. How can you implement anyou don't have knowledge of?
I meant in some cases you cannot change the underlying interface
or base class. Classes in third-party libraries or internal classes, for
example.
If you need to change the interface then you shouldnt be implementing it.
The fact is that since PHP doesn't support parameter basedmethoddispatching, you _can't_ implement both A and B, since you cannotcomply with both signature contracts simultaneously.
IMO I should, using variable arguments. This is currently impossible.
Then you aren't implementing the interface. The interface is a contract, you can't enforce it with variable arguments.
George
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php