Re: Parameter checking in 5.2

From: Date: Thu, 21 Sep 2006 14:46:13 +0000
Subject: Re: Parameter checking in 5.2
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-25784@lists.php.net to get a copy of this message
Hello Christian, the short form is, use interfaces. And the long form is read the upgrade file and find out to use interfaces :-) best regards marcus Wednesday, September 20, 2006, 12:11:27 PM, you wrote: > In the discussion about parameter checking in 5.2 I proposed to relax > the checks a tiny little bit: Don't test static functions (e.g. useful > for factory methods) and allow adding default values to functions (the > object of the inherited class still accepts the same parameters as the > base class). A patch is attached. > Example: > class Base > { > static function factory($x) { } > function foo($x) { } > } > class Spezialized extends Base > { > static function factory() { } # Static method, e.g. factory method > function foo($x = null) { } # Default values for specialized class > } > Regards, > - Chris Best regards, Marcus

« previous php.internals (#25784) next »