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