How to understand 3 lines of c-code?

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { return; } 

Especially what ZEND_NUM_ARGS() TSRMLS_CC do?

+4
source share
4 answers

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

+5
source

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

+4
source

All Articles