Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87607 invoked from network); 11 Jan 2015 16:54:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 16:54:38 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.217.175 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.217.175 mail-lb0-f175.google.com Received: from [209.85.217.175] ([209.85.217.175:53509] helo=mail-lb0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/70-18257-ECAA2B45 for ; Sun, 11 Jan 2015 11:54:38 -0500 Received: by mail-lb0-f175.google.com with SMTP id z11so14557609lbi.6 for ; Sun, 11 Jan 2015 08:54:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=uCjHF7iCK9V5sZwkrLX54W7fUGXwPeFEUHNdGbw80F8=; b=OkSW9rREPH+Tv92fVfDi0sqReJwymv1wVjMKrUSAlvw6alyfTn7E879XfPs5aPp5TR Yu+j4EL2G6FzP/qI/28x63I4dhlzIF3EW2ZFt/6273GVQjEAAo+XSyTkmiTyfMG/Uwkz 9HeNIH8PgEEiX/m4sYENirG1qboxFeNKiurspIIOj7JPptQoJzt+GvJOAmod2R+xgy70 oPFC+z2ppjEuX2y+Y2JexGs6DW2wsQbUyBwFQcdtD7bbGw9W8hNT31ZPYRVFiqpe24AH E2iS8X8282XKNfmjAvT+L3zM6OoSnMdGeDFrL0DeDtoJjwYXjXT6EiD19HMkrv+mVEoP ItGA== X-Gm-Message-State: ALoCoQm6TVw4gtzerhVxE9suNxeWCjVnQTGxhH5/VEbBm3OiUBR0s/x1Vtj67LGZ2pg2aWnK/quX MIME-Version: 1.0 X-Received: by 10.112.183.197 with SMTP id eo5mr32215785lbc.81.1420995275084; Sun, 11 Jan 2015 08:54:35 -0800 (PST) Sender: php@golemon.com Received: by 10.112.171.97 with HTTP; Sun, 11 Jan 2015 08:54:35 -0800 (PST) X-Originating-IP: [199.201.64.2] In-Reply-To: <54B24F71.8010704@lsces.co.uk> References: <54B1AA31.6050703@gmail.com> <54B24F71.8010704@lsces.co.uk> Date: Sun, 11 Jan 2015 08:54:35 -0800 X-Google-Sender-Auth: px4wuvhf4_PtKmh_c76Dkev1WTs Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] One API to rule them all? (Was: Extension Prepend Files) From: pollita@php.net (Sara Golemon) On Sun, Jan 11, 2015 at 2:24 AM, Lester Caine wrote: > On 11/01/15 04:08, Sara Golemon wrote: >> My idea is to cover *most* (but not all) extensions with a narrower, >> simplified API. As you say, many interactions fall into the "marshal >> this engine value to a C type as needed". This can cater to the >> bread-and-butter of PHP extensions very well. > > Having a rather large reliance on Firebird, the fact that it gets pushed > to the 'someone else will do that when they need it' pile is a little > irritating. All the extension does is interfaces the Firebird Client to > PHP and the majority of the times it has become unavailable are due to > framework changes. Other extensions are currently in the same state on > phpng? All database related. > I think I may have been unclear. I don't mean that "those exceptional extensions should have to extend the API themselves", I mean that not everything needs to be expressible in a common language. I picked out runkit as an example to illustrate this because it does /weird/ things. Database connectors like ibase/firebird/etc... don't generally do those things. The goal of this project is, in fact, to stop breaking simple extensions like firebird/ibase who's only purpose is to bridge PHP to C/C++. The framework they depend on should be solid enough that an extension written for PHP 5.2 will work without having to make changes on PHP7, 8, 15, etc... Depending on how we do it, we might even be able to make it ABI compatible between versions, meaning you don't even need to recompile between 5.2 and 7.0 (yes, that's a stretch goal). > HHVM has only recently started supporting the interbase extension, but I > think does not have the fbird_ aliases which while there is still no > break between firebird and interbase, this is an area which will change > with the next generation of Firebird. > As an aside, if you've got a list of what needs aliasing, I can add that this weekend. :) In HHVM, aliases a method literally looks like: function intlcal_get_repeated_wall_time_option(IntlCalendar $cal): int { return $cal->getRepeatedWallTimeOption(); } > Alright we do have a couple of people who understand the PHP side enough > to address the very small number of bugs that have affected the > extension but it does need a programmer who understands the fundamental > changes being made that is needed to port the still missing extensions :( > Again, the goal here is to NOT need those experts involved. An extension written for 5.2 shouldn't have to care about changes in the engine, it should only care that "I expect these C types when my API is called, and I'm returning this C type". I don't want you to have to know that zvals no longer store reference sementics directly. I don't want you to have to deal with refcounting. I don't want you to have to know when to separate and when not to just so that you can convert some mixed type. > I know you are only talking about the mechanism Sara, but some of us are > still unable to even play with the current master on our framework > because only 'most' extensions are currently supported. > I know. I'm one of 'em. This is partially coming out of my frustrated attempts to #ifdef my way around making my extensions work on PHP5 and PHP7 with the knowledge that the API is still shifting under my feet. That's why I think it's time for a stable public API which is independent from the engine. -Sara