Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103408 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 34524 invoked from network); 29 Oct 2018 14:27:58 -0000 Received: from unknown (HELO mail-ua1-f54.google.com) (209.85.222.54) by pb1.pair.com with SMTP; 29 Oct 2018 14:27:58 -0000 Received: by mail-ua1-f54.google.com with SMTP id x3so2784060ual.12 for ; Mon, 29 Oct 2018 03:44:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DxaNvDxFhP/eKXScQkomc0LhAsuGVIihAmNZDxVlWWc=; b=Z55yZri21Y55hKh/yzJzbn3up5zS+LfcGPSYqq/dUimMdrD1AYlTCqoqLcITzreQyh ikAJHl9jwpGIM7aWhM9ikQOZEAsub9uDXiF7gntday//u0y5SW8FghMRVriuPq0BzJid gDfqy/JkB7/JvWb2Bjc6ZqiK6feTfxok1cfosnvELeZB0g86qIYP/Hp75BQxLgxk8mvs 4RF3DlvYeYm8TS0U1g+EvhiBZtH+nyZ8cpbLXqQ4AEaZ3FwQS4X2mwocS6SpRHmxrW+y fxOI7REtDWbZl0eHupdmwqrXdwCo3zE575aEmCIsN4pFs6PxK+rGsafoqtXjgme56rwS y/1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DxaNvDxFhP/eKXScQkomc0LhAsuGVIihAmNZDxVlWWc=; b=QWJc3HiYCnuxZT1cotGVPsXOtTMV0MjKTvnXtt2iSC9OdJF0Zrm7ELyg+6j784YrAd 8wneApvGFptbyVrf3dkKGugi7HW7OTiEWJJUK3qmhx6eq1x0v2izwxwoNy9IAVpU85FE M02MJZSktKLjuEoDfZmi/cLy9ac0aLhmdUPWBZgj9HCC2ZfYWJ1nix936mYcSNA7RSHO ol5bBrBLhTw1IEZ2r8FgRbkj9bqNB2QIsCwYW7u6/Sl3pDsWmRvh+kx/zTWZi54kEH2b 2BHRy4JQPI9kRnGzErXvcpCa1Xgjhb6CAdTIKT6A+c1iVT1dxTej1FCHSQXAhilVRh0O NpvQ== X-Gm-Message-State: AGRZ1gJNi38rHn2aCmhZmd33qwG3/VSDALyehbsjogUYWWXyco+pHnaM RNgNX7Ft/Yd24MUa++qaM4t4cSgPFkMIWSRTHobiaA== X-Google-Smtp-Source: AJdET5fHU0MQVKGZWWdtow+m7ADz9FB9UXQetnuOxhFCTEfHnws2SWbocSraZIGJacujqEhGghTTGvafiMIB4YavdFU= X-Received: by 2002:ab0:b82:: with SMTP id c2mr6080446uak.121.1540809859599; Mon, 29 Oct 2018 03:44:19 -0700 (PDT) MIME-Version: 1.0 References: <5e03c825-0079-4a4e-8cbe-2750efdad9e2@email.android.com> <5f8379f2-fccd-1c0e-c824-8238159842c5@zend.com> In-Reply-To: <5f8379f2-fccd-1c0e-c824-8238159842c5@zend.com> Date: Mon, 29 Oct 2018 11:44:08 +0100 Message-ID: To: Dmitry Stogov Cc: Michael Wallner , Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary="00000000000059130a05795bc0c4" Subject: Re: [PHP-DEV] [RFC] Preloading From: crocodile2u@gmail.com (Crocodile) --00000000000059130a05795bc0c4 Content-Type: text/plain; charset="UTF-8" Just a side question: will the information on preloaded userland classes and functions be available via php --rc / php --rf commands? On Thu, Oct 25, 2018 at 10:42 AM Dmitry Stogov wrote: > > On 10/25/18 10:47 AM, Michael Wallner wrote: > > On 20/10/2018 15:06, Dmitry Stogov wrote: > >> > >> On Oct 19, 2018 5:20 PM, Sara Golemon wrote: > >> On Fri, Oct 19, 2018 at 3:17 AM Dmitry Stogov wrote: > >>> I would like to start discussion on a Preloadng RFC > https://wiki.php.net/rfc/preload > >>> > >> 4) "In conjunction with ext/FFI (dangerous extension), we may allow > >> FFI functionality only in preloaded PHP files, but not in regular > >> ones." Is there any interest in something like HHVM's HNI interface? > >> FFI always sounds nice in theory, but complex types mean that a little > >> bit of glue code is often a plus. > > > > As always when it comes to PHP and FFI I'd like to point out ext-psi [1] > > which uses a different approach than other PHP FFIs until now. > > > > It parses PSI files at startup, which basically are C header files > > augmented with the PHP userland interface decls, see for example the PSI > > file for time.h [2] > > > > As you can see, marshalling from and to native types has been taken > > seriously, and while we're capable of recursively unmarshalling e.g. > > addrinfo structs [3] and handling sqlite callbacks [4] it's still not > > possible yet for something like curl_easy_setopt. > > > > > > > > [1] https://github.com/m6w6/ext-psi > > [2] https://github.com/m6w6/ext-psi/blob/master/psi.d/time.psi > > [3] https://github.com/m6w6/ext-psi/blob/master/psi.d/netdb.psi#L70 > > [3] https://github.com/m6w6/ext-psi/blob/master/tests/netdb/gai001.phpt > > [4] > https://github.com/m6w6/ext-psi/blob/master/tests/sqlite/sqlite.psi#L56 > > [4] > https://github.com/m6w6/ext-psi/blob/master/tests/sqlite/sqlite001.phpt > > > > > hi Michael, > > You made a great job developing ext-psi. > > But anyway, I more like my own FFI implementation (at least because it's > simpler and it's mine). > > FFI::load() in conjunction with preloading, would provide functionality > similar to PSI files loading on startup. > > In the future, I would like to push ext/FFI into core and integrate it > with JIT (similar to LuaJIT way). > > In any case, this thread is about preloading, that is interesting by > itself. FFI and JIT are the future scope. > > Thanks. Dmitry. > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Best regards, Victor Bolshov --00000000000059130a05795bc0c4--