Compatibility library for extensions
| From: | François Laupretre | Date: | Tue, 10 Nov 2015 14:53:24 +0000 |
| Subject: | Compatibility library for extensions | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-89148@lists.php.net to get a copy of this message | ||
Hi,
Some of you may be interested by a project I just released at https://github.com/flaupretre/pecl-compat.
This is a compatibility library. The objective is to minimize the pain of making a PHP extension compatible with both PHP 5 and 7, while allowing to keep a single code tree.
Of course, it does not bring solutions to every cases you may encounter and some 'ifdef' will still remain, but it solves a lot of issues, especially related to changes in zend_string and zend_hash, which were the most annoying in my case.
For an example of an extension using this compatibility layer, look at https://github.com/flaupretre/pecl-pcs.
Feel free to comment, test, and suggest improvements.
Regards
François