Skip to content

Commit 91e44a2

Browse files
vjardinnikic
authored andcommitted
skeleton: support PHP 7.2
skeleton can still be leveraged with older PHP releases, including PHP 7.2. I wanted to add this capability since PHP 7.2 is still widely provided with most Linux distributions. I am using ext_skel.php on a vanilla Ubuntu 18.04 and Windows in order to illustrate how to develop a PHP extension for both OS using the default tools provided by the distributions. see: https://github.com/vjardin/php-bonjour
1 parent 1732ce9 commit 91e44a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/skeleton/skeleton.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
#include "ext/standard/info.h"
99
#include "php_%EXTNAME%.h"
1010

11+
/* For compatibility with older PHP versions */
12+
#ifndef ZEND_PARSE_PARAMETERS_NONE
13+
#define ZEND_PARSE_PARAMETERS_NONE() \
14+
ZEND_PARSE_PARAMETERS_START(0, 0) \
15+
ZEND_PARSE_PARAMETERS_END()
16+
#endif
17+
1118
/* {{{ void %EXTNAME%_test1()
1219
*/
1320
PHP_FUNCTION(%EXTNAME%_test1)

0 commit comments

Comments
 (0)