I agree with the idea that it would be nice to force an instance of a particular class, etc. to be passed. However, if we are going to introduce another keyword anyway why not keep BC intact by by introducing the 'force' keyword:
function myfunction(force ClassName $param, NextClass $another) { } Where 'force' would prevent $param from being passed as anything but an acceptable ClassName. Alternatively, for the sake of parsing you could do: function myfunction(Classname forced $foo) { } I remember discussing 'array' as a typehint (big +1 there), but I don't see anything gained from such a type-hint. When exactly would you use it (that you couldn't use the existing type hinting).. I guess the obvious answer is when you don't know the type of class being passed, but if you don't know that how do you plan on actually using the parameter at all? John -- -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- John Coggeshall http://www.coggeshall.org/ The PHP Developer's Handbook http://www.php-handbook.com/ -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php