Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80315 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25438 invoked from network); 10 Jan 2015 01:48:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2015 01:48:33 -0000 Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.174 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.216.174 mail-qc0-f174.google.com Received: from [209.85.216.174] ([209.85.216.174:41830] helo=mail-qc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/32-11748-1F480B45 for ; Fri, 09 Jan 2015 20:48:33 -0500 Received: by mail-qc0-f174.google.com with SMTP id c9so11904158qcz.5 for ; Fri, 09 Jan 2015 17:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UBE2yk7Lj2il/s3YIysyMOiPlqZTSELIXX++ixOGURQ=; b=jD8bobpgEtd1ti+fD+BajGcm5lCtRHNrf4040HE4+DBEHClxyyMouaamI5Yxxg1gUn oscMHd0iehL6Lzon+CJrIuUMr+NYGUqrQXONUdS7oooavkJGDqWYccBn0BAvvh0Z44C9 vcZ7KIzuXal+k/wDlh9G/jJAaedl3moyFIe9mmpAk616Cqk8AItnks0DhWTKljcQuRAU 9ptGoxF6aTC6XF9SFl8//9Kszasm1EZS4Xf5y3ep3uGEDDRk/pueazlNP1WtdNk2xl0d 8Ji3JFVi/BohQyH7pjegHrcGwAngNtBn8AEiNnT1pAnfnnkEKgVyhQ5iwn5yH3JQEwEU RzUg== MIME-Version: 1.0 X-Received: by 10.224.11.5 with SMTP id r5mr32881574qar.10.1420854510970; Fri, 09 Jan 2015 17:48:30 -0800 (PST) Received: by 10.229.174.6 with HTTP; Fri, 9 Jan 2015 17:48:30 -0800 (PST) Received: by 10.229.174.6 with HTTP; Fri, 9 Jan 2015 17:48:30 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Jan 2015 01:48:30 +0000 Message-ID: To: Sara Golemon Cc: PHP Internals List , "Pierre (php.net gtalk)" Content-Type: multipart/alternative; boundary=001a11c2c01e676eee050c4278ba Subject: Re: [PHP-DEV] One API to rule them all? (Was: Extension Prepend Files) From: dragoonis@gmail.com (Paul Dragoonis) --001a11c2c01e676eee050c4278ba Content-Type: text/plain; charset=UTF-8 On 10 Jan 2015 01:10, "Sara Golemon" wrote: > > On Thu, Jan 8, 2015 at 5:44 PM, Pierre Joye wrote: > > The fact that hhvm implements a significant part of the extensions (or > > other areas) using PHP+additional syntax as well as adding cleaner > > APIs or mechanisms for the C parts only confirms me one thing: the > > very 1st problem we have to solve is to ease the extension creation, > > by drastically changing the internals APIs & tools. Bundling script > > does not help here, we are using a scotch tape to repair something > > that should have been replaced or redesigned since long already. I am > > not blaming anyone, the engine design, historically, does not make > > such changes easy. > > > Funny to see you mention this. I literally just pulled together a > meeting today to discuss HHVM's admittedly unstable extension API. > One idea to emerge from this was to design a new extension API > agnostic of underlying implementation. An API which, if done right, > could be adapted equally to both PHP7 and HHVM *and* provide the > opportunity to introduce PHP5 shims so that a single extension could > be written to function identically under any PHP runtime, and any > version. If done right, could make extensions not just source > compatible, but *binary* compatible as well. The engine details can > change, but the public-facing extension API could offer a consistent > way of doing the one and only thing that extensions should have to do: > Glue PHP into external libraries. > > That's a bit pie in the sky, I'll admit, but wouldn't that be cool? > Fact is, JNI does this for Java already, so there's precedence to > learn from. Heck, we're actually halfway there with HHVM's > "ext_zend_compat" layer, which makes PHP extensions (mostly) source > compatible with HHVM. > > While I could work on this in the dark, manipulating HHVM's APIs with > one hand and adding proxy interfaces to PHP (as an extension) with the > other, I'd much rather have involvement from others. > > What do you think? Hi Sara, Somewhat Pie in the sky but at the same time also achievable with good planning and design. I'd support this definitely and this abstraction layer would solve constant maintainability of extensions by not having to update themselves constantly to support latest versions of PHP due to a lack of abstraction. Did that make sense ? > > -Sara > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --001a11c2c01e676eee050c4278ba--