Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80314 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24018 invoked from network); 10 Jan 2015 01:46:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2015 01:46:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.217.174 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.217.174 mail-lb0-f174.google.com Received: from [209.85.217.174] ([209.85.217.174:57589] helo=mail-lb0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/D1-11748-09480B45 for ; Fri, 09 Jan 2015 20:46:57 -0500 Received: by mail-lb0-f174.google.com with SMTP id 10so11403631lbg.5 for ; Fri, 09 Jan 2015 17:46:54 -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 :content-transfer-encoding; bh=eda8fB6B1WEqZLmvlb3UYJhTjJIHYnIOJGtFS4+HhTw=; b=hJ/C1gWgCsQOPx3I3fp+ZalFR/BGpFnt560PmOc5+DbeFa85dS7O+tZ6zA1YNS7XN0 uc/eI510Ts7sTjV0SmMp1nBGO9v8M+PZW2flBusx31ZKVeazvj94tJzvPwWP9Z7mboaq x4DRnMAl151py4wZWxvWnscTi3kqFHH57m7WY6hDV7u1In+jMXH2HHmGP/lJMUiATP33 8sr9obBPalESNR32t0efZoaQe78+ojAKSeFrYU1ntFXCcRx/Z4MMZlHG6Zyr8cMxBXnT ScrZNVNgotyOpRA6VpiHkeCMlAH+1OyaZaE9mbKKeipZdq4YTn0KJkb+Vvy5/VANDmqe UeMg== X-Gm-Message-State: ALoCoQmYdvq/Kg34j1J5LtkNJ1vN5uHcfl86ncsUmc99LG6rLaIEpGrNKtT4WxpZg9/r5/efn0La MIME-Version: 1.0 X-Received: by 10.112.78.39 with SMTP id y7mr25230626lbw.42.1420854413986; Fri, 09 Jan 2015 17:46:53 -0800 (PST) Sender: php@golemon.com Received: by 10.112.171.97 with HTTP; Fri, 9 Jan 2015 17:46:53 -0800 (PST) X-Originating-IP: [73.189.247.124] In-Reply-To: <0CF6BEE1-0EDA-450D-A3EC-AB9FC2169AC1@ajf.me> References: <0CF6BEE1-0EDA-450D-A3EC-AB9FC2169AC1@ajf.me> Date: Fri, 9 Jan 2015 17:46:53 -0800 X-Google-Sender-Auth: U_TdRsb1yHi1KtwTqbE4njpYBDQ Message-ID: To: Andrea Faulds Cc: Pierre Joye , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] One API to rule them all? (Was: Extension Prepend Files) From: pollita@php.net (Sara Golemon) On Fri, Jan 9, 2015 at 5:41 PM, Andrea Faulds wrote: > Three APIs for TheFacebook under the sky, > Seven for the Zend-lords in their halls of stone, > Nine for the Engines doomed to die, > One for the Dark Lord on his dark throne, > In the Land of Native where the Undefined Behaviours lie. > One API to rule them all, One API to find them, > One API to bring them all and in the darkness bind them > In the Land of Native where the Undefined Behaviours lie. > *slowclap* > I think this is a good idea. Most PHP extensions do not require > tight coupling to the Zend Engine (or indeed HHVM). Something > simple which exposes class, function and constant definition, > and abstract PHP value (zval) handling, would be enough for > the vast majority of extensions, I should think. > Exactly. This is what we learned from making ext_zend_compat. Basic glue extensions are the majority, those places where a lot of extensions currently "link deep" are simply because they can, but not because they need to. > There=E2=80=99ll always be a place for tightly-coupled extensions which > need to use the engine=E2=80=99s =E2=80=9Cnative=E2=80=9D API, but someth= ing simple and > cross-implementation would work for most extensions, allow > better cross-implementation PHP code compatibility, and generally > be a Good Thing(TM), I think. > For the handful that do funky stuff like OpCache+, Xdebug, etc... They can explicitly reach behind the artifice with the understanding that they're not necessarily going to work from version to version without loads of #ifdefs and kinky machinations. -Sara