internals:engine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
internals:engine [2011/04/06 10:59]
127.0.0.1 external edit
internals:engine [2011/08/29 00:41]
cataphract [Extension Globals]
Line 129: Line 129:
 } }
 </​code>​ </​code>​
 +
 +The globals constructor and destructor are NOT execute per-request,​ they are part of the module startup/​shutdown. The globals can store data across requests. If you need to do per-request operations to the globals, use module-activate and module-deactivate callbacks.
  
 Note: ZEND_MODULE_GLOBALS_CTOR_D will declare a function as receiving a zend_extname_globals*,​ not void* and zend_module_entry is supposed to contain a function pointer type that receives void*. I think this violates the C standard (the declarations are incompatible),​ but should however by safe since the arguments have the same size. Note: ZEND_MODULE_GLOBALS_CTOR_D will declare a function as receiving a zend_extname_globals*,​ not void* and zend_module_entry is supposed to contain a function pointer type that receives void*. I think this violates the C standard (the declarations are incompatible),​ but should however by safe since the arguments have the same size.
internals/engine.txt · Last modified: 2017/09/22 13:28 (external edit)