Re: substr passing null...
| From: | Johannes Schlüter | Date: | Thu, 29 Jan 2009 10:15:32 +0000 |
| Subject: | Re: substr passing null... | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42875@lists.php.net to get a copy of this message | ||
Hi,
On Thu, 2009-01-29 at 09:29 +0100, David Zülke wrote:
> Out of curiosity - how hard would it be to implement a "default"
> keyword that can be passed in function/method calls with the new
> parameter parsing API?
It would mean to introduce a new value type or tons of rewrites. But as
I said there's all we need with "s!" as modifier then we can handle
NULL-Params independently from a String-Parameter - where this makes
sense.
With other functions not NULL is the default but the value of some
Flag-Parameter (const DEFAULT_VALUE = 1024; function foo($param =
DEFAULT_VALUE);) so this is a case by case thing ...
But as said before: We should check functions where we changed the
parameter parsing to be as less BC as it makes sense.
johannes