Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89148 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51728 invoked from network); 10 Nov 2015 14:53:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2015 14:53:31 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.6 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.6 smtp6-g21.free.fr Received: from [212.27.42.6] ([212.27.42.6:56031] helo=smtp6-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/63-21426-9E402465 for ; Tue, 10 Nov 2015 09:53:31 -0500 Received: from [127.0.0.1] (unknown [82.232.41.54]) (Authenticated sender: flaupretre@free.fr) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 9976082251 for ; Tue, 10 Nov 2015 15:43:44 +0100 (CET) To: PHP internals Message-ID: <564204E4.2050108@php.net> Date: Tue, 10 Nov 2015 15:53:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 151110-0, 10/11/2015), Outbound message X-Antivirus-Status: Clean Subject: Compatibility library for extensions From: francois@php.net (=?UTF-8?Q?Fran=c3=a7ois_Laupretre?=) 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