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
This commit is contained in:
Vincent JARDIN 2019-01-02 00:06:29 +01:00 committed by Nikita Popov
parent 1732ce9c23
commit 91e44a27f6

View File

@ -8,6 +8,13 @@
#include "ext/standard/info.h"
#include "php_%EXTNAME%.h"
/* For compatibility with older PHP versions */
#ifndef ZEND_PARSE_PARAMETERS_NONE
#define ZEND_PARSE_PARAMETERS_NONE() \
ZEND_PARSE_PARAMETERS_START(0, 0) \
ZEND_PARSE_PARAMETERS_END()
#endif
/* {{{ void %EXTNAME%_test1()
*/
PHP_FUNCTION(%EXTNAME%_test1)