Type hints with null default values

From: Date: Sat, 16 Oct 2004 19:13:51 +0000
Subject: Type hints with null default values
Groups: php.internals 
Request: Send a blank email to internals+get-13348@lists.php.net to get a copy of this message
Hi @ll, Now that 5.0.3 is out, maybe it's time to bring back that old problem left in May: type hints and null default values. This feature was dropped since no one could come with a reasonable solution. So, for now, there is no (engine) way to have a parameter that can only be of some class or null. Am I right ? The use of null (I know it's not a value it's a type...) is justified because we don't have a "value" to represent a NULL OBJECT(or NO OBJECT). IMO, this is a necessary feature (maybe others thing this way too) and that's why I brought it back. Cristiano Duarte

« previous php.internals (#13348) next »