Re: Idea: use stub.php and arginfo.h in PHP 7.x

From: Date: Sun, 26 Apr 2020 01:16:00 +0000
Subject: Re: Idea: use stub.php and arginfo.h in PHP 7.x
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-16714@lists.php.net to get a copy of this message
Hi Remi, If we use this stub.php file to generate an arginfo.h file, should the src package of extension contain stub.php or not? BTW, thank you for your tips! Remi Collet <remi@fedoraproject.org> 于2020年4月23日周四 下午8:40写道: > Hi, > > One interesting feature of PHP 8 is the automatic > generation of arginfo from a stub file. > > > Just thinking if this can be used for PECL extension > and used in PHP 7 compatible version. > > > A WIP exists in xattr [1] extension > > > How it works: > > - arginfo are only generated when the extension is build > against PHP 8, so most of the work must be done there > > - Build against PHP 7 will use the same file > > - stub.php may have some conditional for PHP 8 new features > (e.g. union type usage) > > - some compat macro defined before including arginfo.h > may be needed (e.g. ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE) > > > At a first glance, it seems working and nice to use > > > Comment welcome about this. > > > > Remi > > > [1] https://github.com/php/pecl-file_system-xattr > >

« previous php.pecl.dev (#16714) next »