README.EXT_SKEL 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. WHAT IT IS
  2. It's a tool for automatically creating the basic framework for a PHP extension.
  3. HOW TO USE IT
  4. Very simple. First, change to the ext/ directory of the PHP sources. Then
  5. run the following
  6. php ext_skel.php --ext extension_name
  7. and everything you need will be placed in directory ext/extension_name.
  8. If you don't need to test the existence of any external header files,
  9. libraries or functions in them, the extension is ready to be compiled in
  10. PHP. To compile the extension, run the following:
  11. ./buildconf; ./configure --enable-extension_name; make
  12. The definition of PHP_extension_NAME_VERSION will be present in the
  13. php_extension_name.h and injected into the zend_extension_entry definition. This
  14. is required by the PECL website for the version string conformity checks
  15. against package.xml
  16. SOURCE AND HEADER FILE NAME
  17. The ext_skel.php script generates 'extension_name.c' and 'php_extension_name.h'
  18. as the main source and header files. Keep these names.
  19. extension functions (User functions) must be named
  20. extension_name_function()
  21. When you need to expose extension functions to other extensions, expose functions
  22. strictly needed by others. Exposed internal function must be named
  23. php_extension_name_function()
  24. See also CODING_STANDARDS.
  25. OTHER OPTIONS
  26. Run php ext_skel.php --help to see the available options.