if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { return; }
Especially what ZEND_NUM_ARGS() TSRMLS_CC do?
ZEND_NUM_ARGS() TSRMLS_CC
It looks like TSRMLS_CC is a macro that can be undisclosed, or it can expand to an extra argument with a comma added:
http://blog.golemon.com/2006/06/what-heck-is-tsrmlscc-anyway.html
This Zend article reads:
The main part The zend_parse_parameters () block will almost always look the same. ZEND_NUM_ARGS () provides a Zend Engine hint about the parameters to be received, TSRMLS_CC is to ensure thread safety
http://docstore.mik.ua/orelly/webprog/php/ch14_07.htm
see http://www.hospedajeydominios.com/mambo/documentacion-manual_php-pagina-zend_arguments_retrieval.html