php - What is 'module_number' as argument to zend_register_list_destructors_ex -


I am writing a php extension and need to register a resource. I have read how to do this and read all the examples.

  module_number   

Zend_register_list_destructors_ex (NULL, NULL, DESCRIPTOR_NAME, module_number);

There is no document given to me that what is 'module_emember' I tried to use that call in my call in the function and I got the following error: < 'C: \ program files (x86) \ Microsoft Visual Studio 9.0 \ VC \' \ ': \' \ programmable files \ x86 \ Bin \ cl.exe "': Stop the return code' 0x2 '

The last argument of the function call is considered or the' module_member ' Or are using all other examples? Thanks in advance.

zend_register_list_destructors_ex should should be called inside a PHP_MINIT function. Your Extension

If you see the macro definition for PHP_MINIT, its extension

int zm_startup _ # # module (int Type, int module_number TSRMLS_DC)

with the # # module is the string name of your module

module_number is a integer engine Has been passed in the startup function

The number of that module is the ID that PHP remains internally to recognize the extension when it is registered

using shmop extension resources A good example of a simple extension is

This is the implementation of zend_register_list_destructors_ex calling

And here's where the MINIT function is registered < / P>

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -