Array is already built in, and for mixed, as you already mentioned, indeed
no type hinting. I definitely want this implemented, +1 from me.

On Thu, Apr 17, 2008 at 11:01 AM, Arvids Godjuks <[EMAIL PROTECTED]>
wrote:

> What about types like
> array
> mixed
>
> Ok, for "mixed"  we may not use type hinting at all - does patch allow to
> hint only part of function args?
> If we have a function, witch takes as 1st argument array or string and
> other
> args should have strict types or just use call like myFunc(Array($string),
> .....) ? This is just to know this for sure.
>
> 2008/4/17, Felipe Pena <[EMAIL PROTECTED]>:
> >
> > Hello again!
> >
> > Now with both parameter and return value type hints.
> >
> > For parameter type hints, i have completed the actual implementation
> > with the leftover php types:
> > - string (binary string and unicode)
> > - integer (accepting numeric string too)
> > - double (accepting numeric string too)
> > - boolean ('0', '1', true, false)
> > - resource
> > - object
> >
> > (Yes, following our dynamic typing)
> >
> >
> > Since then, the patch also includes new methods to Reflection:
> > - isInt()
> > - isDouble()
> > - isBool()
> > - isString()
> > - isObject()
> > - isResource()
> >
> >
> > And for return value, i have modified and improved the previous patch,
> > and now it is using only the "(type)" notation. Hence, that
> > implementation doesn't make any BC break.
> >
> >
> > Examples, patches and tests: http://wiki.php.net/rfc/typehint
> >
> >
> > Thanks.
> >
> > --
> > Regards,
> > Felipe Pena.
> >
> >
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



-- 
Lucas

Reply via email to