Re: Type hints with null default values

From: Date: Wed, 27 Oct 2004 08:53:33 +0000
Subject: Re: Type hints with null default values
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-13557@lists.php.net to get a copy of this message
Marcus Boerger wrote:
So for now the only addition we may probably consider for 5.1 is adding 4: optional typehinted values that default to null and only null.
Please don't add another parameter syntax (especially with line-noi... err special characters) like [BaseClass]. This would make PHP more unreadable than it needs to be for a minor feature. To allow foo(BaseClass $objA = null) to also accept foo(null); handles the few cases where you want to pass null nicely IMHO. Advocating to only change the PHP syntax to simplify it, - Chris

« previous php.internals (#13557) next »