On Wed, 8 Dec 2021 at 16:02, Jeremy Mikola <jmik...@gmail.com> wrote: > > > We haven't explored using stubs, but I'll keep that in mind. ... > (which we plan to do since we finally dropped support for PHP > 7.1). >
FYI, the stub files maintain #ifdef info through their processing, which allows some useful shenanigans* e.g.: https://github.com/Imagick/imagick/blob/86d95fed787d60db110ccfeb2d89ec53f1d1f5f7/Imagick.stub.php#L168-L182 https://github.com/Imagick/imagick/blob/86d95fed787d60db110ccfeb2d89ec53f1d1f5f7/Imagick_arginfo.h#L748-L778 So the stubs are used to generate arg info for Imagick from PHP 5.4 to 8.1, across lots of versions of ImagickMagick. I'm finding managing function signatures in a PHP file, in standard PHP format, is a lot nicer than maintaing that info in C files. cheers Dan Ack * Though, tbh, I wished I'd known about /** @generate-legacy-arginfo */ before doing some of the hacks in the Imagick regen_arginfo.sh script. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php