6 #define PHP_ANCILLARY_VERSION "1.0"
7 #define PHP_ANCILLARY_EXTNAME "ancillary"
9 extern zend_module_entry ancillary_module_entry;
10 #define phpext_ancillary_ptr &ancillary_module_entry
12 // declaration of a custom mop_function()
13 PHP_FUNCTION(mop_function);
15 // list of custom PHP functions provided by this extension
16 // set {NULL, NULL, NULL} as the last record to mark the end of list
17 static function_entry mop_functions[] = {
18 PHP_FE(mop_function, NULL)
22 // the following code creates an entry for the module and registers it with Zend.
23 zend_module_entry ancillary_module_entry = {
24 #if ZEND_MODULE_API_NO >= 20010901
25 STANDARD_MODULE_HEADER,
27 PHP_ANCILLARY_EXTNAME,
29 NULL, // name of the MINIT function or NULL if not applicable
30 NULL, // name of the MSHUTDOWN function or NULL if not applicable
31 NULL, // name of the RINIT function or NULL if not applicable
32 NULL, // name of the RSHUTDOWN function or NULL if not applicable
33 NULL, // name of the MINFO function or NULL if not applicable
34 #if ZEND_MODULE_API_NO >= 20010901
35 PHP_ANCILLARY_VERSION,
37 STANDARD_MODULE_PROPERTIES
40 ZEND_GET_MODULE(ancillary)
42 // implementation of a custom mop_function()
43 PHP_FUNCTION(mop_function)
45 RETURN_STRING("This is my function", 1);