So ensure Z_PARAM_OPTIONAL is correctly call at the right place
Only in DEBUG build
Will raise 'Assertion `_i > _min_num_args || _optional==0' failed.'
or 'Assertion `_i <= _min_num_args || _optional==1' failed.'
Thus will allow to detect bad code early.
#define Z_PARAM_PROLOGUE(separate) \
++_i; \
+ ZEND_ASSERT(_i <= _min_num_args || _optional==1); \
+ ZEND_ASSERT(_i > _min_num_args || _optional==0); \
if (_optional) { \
if (UNEXPECTED(_i >_num_args)) break; \
} \
zend_parse_arg_zval_deref(_arg, &dest, check_null); \
} else { \
++_i; \
+ ZEND_ASSERT(_i <= _min_num_args || _optional==1); \
+ ZEND_ASSERT(_i > _min_num_args || _optional==0); \
if (_optional && UNEXPECTED(_i >_num_args)) break; \
_real_arg++; \
zend_parse_arg_zval(_real_arg, &dest, check_null); \