Hi,
I'm experiencing an issue adding type hints to the function prototypes.
The following definition gives the "unknown typehint" error when invoking
a function
ZEND_BEGIN_ARG_INFO_EX(arg_info_trader_adosc, 0, 0, 4)
ZEND_ARG_TYPE_INFO(0, high, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, low, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, close, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, volume, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, fastPeriod, IS_LONG, 1)
ZEND_ARG_TYPE_INFO(0, slowPeriod, IS_LONG, 1)
ZEND_END_ARG_INFO();
The reason I trip up on this is to generate the xml doc proto for the
extension. Therefore I'm using the extended ZEND_ARG_INFO version. Without
type hints there are no param types in the xml.
Quickly looking at the sources I realize that 5.4.3 has an explicit type
hint check which was previously ignored in 5.3
http://lxr.php.net/opengrok/xref/PHP_5_4/Zend/zend_execute.c#600
The reason of writing this is not to start a new discussion about scalar
types, for God's sake not :), but just to point at the collision with the
current core and doc generator. A simple way to fix this would be to
restore the old 5.3 behaviour just passing on scalar types. Or may be
there were a simple solution for this, despite 5.4.3 is already issued?
Cheers
Anatoliy
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php