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
Lovely.
- David
-----Original Message-----
From: Derick Rethans [mailto:derick@php.net]
Sent: Friday, October 07, 2005 10:30 PM
To: PHP Developers Mailing List
Subject: [PHP-DEV] Type Hints with NullHello,
attached is a patch (by Markus) that allows you to make typehints
optionally takeNULL
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