Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82157 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20174 invoked from network); 8 Feb 2015 18:14:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2015 18:14:43 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.178 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.223.178 mail-ie0-f178.google.com Received: from [209.85.223.178] ([209.85.223.178:41610] helo=mail-ie0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/27-15550-297A7D45 for ; Sun, 08 Feb 2015 13:14:43 -0500 Received: by iecvy18 with SMTP id vy18so11843963iec.8 for ; Sun, 08 Feb 2015 10:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=zu5b2b8j4oQcDK1G0YRtfd3UwZjq9bH0Ia1m2Wk4JQw=; b=yz4zer4D+zcwRf0fZDHVPQ/aUR8iypjXP+28d394UrChH+vUEuhgWrChLrKH8hygss OejesGMiqIzIUMbzK7BZeWFheSOUnvQb5XeNkI1U3VprdFvf9ahWYnZICOhF39y5VpJ6 6gjJ7pd5h7phz3+xVAvBLwCJtOlaZ5nzHj2Rk5aKCz7yCkoJHURoynkaIAwQM2xdKVDh WA8Wn31vldUIGYYLbJ4lLXE4ZU3CLdwdcPwZA7SqUCka6FUe3IE5vxzvuZdzOXCmJWvv tIe7zI3GIXppaCnBRaCIjqVwH3PNsdZQevx4Rc8kra8P2ilkWuphdUmoGwAWKPOw4YTc dCNw== MIME-Version: 1.0 X-Received: by 10.107.136.143 with SMTP id s15mr21826228ioi.8.1423419280304; Sun, 08 Feb 2015 10:14:40 -0800 (PST) Sender: jakub.php@gmail.com Received: by 10.107.169.216 with HTTP; Sun, 8 Feb 2015 10:14:40 -0800 (PST) In-Reply-To: References: <54D3EE95.2080109@lerdorf.com> Date: Sun, 8 Feb 2015 18:14:40 +0000 X-Google-Sender-Auth: VxYUIRnUfGc85rMxD38e9v33R1E Message-ID: To: "guilhermeblanco@gmail.com" Cc: Rasmus Lerdorf , PHP internals , Pierre Joye , Xinchen Hui , Yasuo Ohgaki Content-Type: multipart/alternative; boundary=001a113ed55a91ba18050e97a0d4 Subject: Re: [PHP-DEV] Annotated PHP 5->7 extension diff From: bukka@php.net (Jakub Zelenka) --001a113ed55a91ba18050e97a0d4 Content-Type: text/plain; charset=UTF-8 On Thu, Feb 5, 2015 at 10:41 PM, guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > > My biggest concern about all this breakage done for NG could somehow be > minimized by providing possible alternate implementations that could work > both backwards compatible and forwards compatible? > I just don't want to work on extensions I support that would never be > usable in earlier versions once finished the update. > > Hi, I have create a header that does it ( see https://github.com/bukka/phpc/blob/master/phpc.h ). There are still quite a few bits that need to be added and tidied up but it already suppors most cases that I will need in my extension. The header probably doesn't show much (and might look a bit scary ... :) ) so I have created a testing ext that uses it. You can see the result here: https://github.com/bukka/php-extest/blob/master/extest_compat.c As you can see there isn't a single ifdef and it compiles and works (test passes) for PHP 7 and 5 (tested on 5.6 but should be fine for 5.2+). It means that it won't require any changes in PECL. There isn't much documentation as yet because I'm still working on it. But I plan to add it later. Any comments or patches are welcome! Cheers Jakub --001a113ed55a91ba18050e97a0d4--