On 06/21/2015 02:44 PM, Nikita Popov wrote:
> The difference here is that ustrlen() has an argument type specified in
> arginfo, while strlen() triggers an error through
> zend_parse_parameters(). We have practically no arginfo-level type
> annotations in the standard library.

Obviously we can't look into a function to check what it is passing to
ZPP, but maybe ZPP could be made smarter and have it fill in the arginfo
if it isn't there. That sounds slow though.

Or we bite the bullet and fix the arginfo everywhere to make it
consistent. It wouldn't be that hard to write a script to generate the
bulk of it.

I just don't like the fact that a parameter can raise a type error when
it claims to not have a type. It makes writing static analysis and other
type checking tools much more complicated.

-Rasmus

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to