Документ взят из кэша поисковой машины. Адрес оригинального документа : http://old.hcs.cmc.msu.ru/php/zend.structure.implementation.html
Дата изменения: Sun Feb 3 22:58:51 2002
Дата индексирования: Mon Oct 1 23:06:26 2012
Кодировка:
Implementation of All Exported Functions

Implementation of All Exported Functions

Implementing the exported functions is the final step. The example function in first_module looks like this:
ZEND_FUNCTION(first_module)
{
    long parameter;

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

    RETURN_LONG(parameter);
}
The function declaration is done using ZEND_FUNCTION, which corresponds to ZEND_FE in the function entry table (discussed earlier).

After the declaration, code for checking and retrieving the function's arguments, argument conversion, and return value generation follows (more on this later).