Multi-Method Dispatch in PHP 5.1?
| From: | Sebastian Bergmann | Date: | Tue, 20 Apr 2004 14:50:11 +0000 |
| Subject: | Multi-Method Dispatch in PHP 5.1? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-9422@lists.php.net to get a copy of this message | ||
Since we introduce class type hints in PHP 5.0 I think it would be a
good thing [tm] to add multi-method dispatch in PHP 5.1.
What I mean by this would be to allow for the following:
class Foo {
public function doSomething(Foo $foo) {}
public function doSomething(Bar $bar) {}
}
How complicated would this be to implement?
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/