On 06/21/2015 06:11 PM, Stanislav Malyshev wrote: > Hi! > >> Before making more extensive use of arginfo types, I think we should first >> do some adjustments to the way they are handled. In particular adding types >> means that internal fcalls will take the branch in >> http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#3669. As this is hot >> code, it is likely important to avoid doing those duplicate type checks >> (that will also happen in zpp anyway). As such I would suggest to make >> arginfo for internal functions reflection-only. Return type hints are >> already only enforced in debug mode. > > Agreed, for internals arginfo types should be reflection-only. I imagine > that would be very easy to fix just by checking for function type?
Ok, I have fixed the arginfo for all the built-in engine functions. I wrote a little script which generates it from the doc-comments in the code. I think the easiest way to do it is to first go through the file and check the "{{{ proto" comments to make sure the optional args are denoted correctly and no args are missing. To run it: script/dev/genarginfo.php Zend/zend_builtin_functions.c for example. -Rasmus
signature.asc
Description: OpenPGP digital signature