This function is special to all dynamic loadable modules. Take a look at the creation via the ZEND_GET_MODULE macro first:
#if COMPILE_DL_FIRSTMOD ZEND_GET_MODULE(firstmod) #endif |
get_module()() is called by Zend at load time of the module. You can think of it as being invoked by the dl()() call in your script. Its purpose is to pass the module information block back to Zend in order to inform the engine about the module contents.
If you don't implement a get_module()() function in your dynamic loadable module, Zend will compliment you with an error message when trying to access it.