Lovely. - David
> -----Original Message----- > From: Derick Rethans [mailto:[EMAIL PROTECTED] > Sent: Friday, October 07, 2005 10:30 PM > To: PHP Developers Mailing List > Subject: [PHP-DEV] Type Hints with Null > > Hello, > > attached is a patch (by Markus) that allows you to make typehints > optionally take NULL as default value too, f.e.: > > class P { } > class T { > function f(P $p = NULL) { > var_dump($p); > } > } > > $o=new T(); > $o->f(new P); > $o->f(NULL); > $o->f(); > > I would like to commit this patch to HEAD pending any objections. > > regards, > Derick > > -- > Derick Rethans > http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php