Em Qui, 2008-04-17 às 17:17 +0200, Paul Biggar escreveu:
> Hi Felipe,
> 
> Thanks for making the change. This is much more consistent. It remains
> that there is no 'scalar' or 'numeric' hint. Are you planning on
> including them?

No, i'm not planning to do that.

> 
> I also wonder about allowing NULL for an 'array' type hint. Is this
> acceptable? The patch seems to indicate it is. If so, why is this
> allowed?

I added yesterday an information about that in the doc:

"Functions are now able to force parameters to be objects (by specifying
the name of the class in the function prototype) or arrays (since PHP
5.1). However, if NULL is used as the default parameter value, it will
be allowed as an argument for any later call."

> 
> 
> Thanks,
> Paul
> 
> On Thu, Apr 17, 2008 at 4:42 PM, Felipe Pena <[EMAIL PROTECTED]> wrote:
> > Hi.
> >
> >  Well, thinking better about the behavior of type hinting, i decided to
> >  change the proposal for strict type. I.e. don't accept numeric string
> >  as an intenger, etc.
> >
> >  If anyone wants use type hinting, i believe that it should be strict.
> >  Otherwise, it makes more sense to not use it.
> >
> >  Examples, patches and tests: http://wiki.php.net/rfc/typehint
> >
> >
> >  --
> >  Regards,
> >  Felipe Pena.
> >
> >  --
> >  PHP Internals - PHP Runtime Development Mailing List
> >  To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> 
-- 
Regards,
Felipe Pena.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to