Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115354 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96124 invoked from network); 7 Jul 2021 19:16:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Jul 2021 19:16:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EFA0718054A for ; Wed, 7 Jul 2021 12:38:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 7 Jul 2021 12:38:23 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id l2so4981406edt.1 for ; Wed, 07 Jul 2021 12:38:23 -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=FHPsZWH343Qn3H6EvgIeXBA/zlqGuGbHGjVfmXuwQVM=; b=E4It2+mC4pQCGlDlENo1IJwKiDuCKMBhnMbBRoi6uB3eRtFwZCUySu11ax9KyqgG2d boS2OlzGoEe7Z0H5WQsG136zvk9H06b7PdC5JUaKUv6Ht04Umv7hkhc/efWEmabJQ5b3 8IJ3FofRIx49nsHi7OWYk4/myamYNdIWazqbVHpUU3ApqZ2neFS7k0T8WWvEe24u1Gcq du70uhKL8RjXKsEy7epi+WhuzlR0z/LxTx8CgiDCJONt1qpHWSrhp5XlKR7MN/ivP+V3 r1NgCcizd1tttjjlX2fzM7vQ92QUErSS2reBTWEdK9rEhbgYMhr2xXo/3X84jc3AkXvW Zbcg== 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=FHPsZWH343Qn3H6EvgIeXBA/zlqGuGbHGjVfmXuwQVM=; b=AX/PVPQKVrwaoMhKA5LHwK+18P3Rqe7/1YMDJTi9M0hvJMdr8zIo592eeQXM4D/dZz zOo0jQUPqIvfCNTXlew8+TMk/RWo30QuD8IOmBSnWoNFkBJ1/p84e0B15M7FR8i/q2lp bZcu5+2bg3qOtInjnZK4nxcwIPZuEYVMh0pNHApVHD7OYJc+jLYYRyh9n8H+uhn5qP5h gNKbnOGP4BbBrTN6zu6VcERkTD7tzH0MarqCWM1/dcu1E7RXWi6VOosiMJuQtDp7uzLJ 4T9BBlFiKKQjL8qD4ymcRfswtT7aiomyFuttWEFLQid0l6h5JrQtUvmTseo9+875SgOU zR+Q== X-Gm-Message-State: AOAM530+u0qFJNJRWyVRjTcNmngbGGlkciYjt2dHNIpyci9a/cFpCDqk /aUXuq8S1a5BRjpNVLqRX4YBEjyv0NnZPaAKQ+U= X-Google-Smtp-Source: ABdhPJxOjDcWoLgb29F0n7TmxB3Qg1ZASQK4qwRiM9OHr4PCYMSd5MspJf7dp8H3BiwgYJRAfXBqCk6gbglXLIz7X1c= X-Received: by 2002:aa7:c801:: with SMTP id a1mr4608135edt.293.1625686700883; Wed, 07 Jul 2021 12:38:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 7 Jul 2021 21:38:09 +0200 Message-ID: To: Dmitry Stogov Cc: PHP Internals , Nikita Popov , Alexandr Lisachenko Content-Type: multipart/alternative; boundary="00000000000052820505c68dae55" Subject: Re: [PHP-DEV] FFI Type Reflection API From: george.banyard@gmail.com ("G. P. B.") --00000000000052820505c68dae55 Content-Type: text/plain; charset="UTF-8" On Wed, 7 Jul 2021 at 10:31, Dmitry Stogov wrote: > Hi, > > Last week, at a PHP conference, we discussed some missing parts of ext/ffi > with one of the most extrimal FFI user - Alexandr Lisachenko. One of the > things he is missing is a FFI Type Reflection API. Actually, this is a > simple and self-contained feature, that implementation took me a couple of > hours. > > https://github.com/php/php-src/pull/7217 > > This doesn't touch any existing code in ext/ffi, just add the API that is > better visible through stub: > > https://github.com/php/php-src/pull/7217/files#diff-3651c407d02a2a152d9aba6e484f6ae7f4c2c85fa2992274d76c0e18364c7e6fL75-R96 > > Unfortunately, PHP-8.1 is closed for new RFC, so we can merge this as a > self-contained feature, or wait for the next version. I ask to merge this > into PHP-8.1, but won't do this, in case of any objections. > > Thanks. Dmitry. > Ideally the array/struct/function CTypes would be subclasses, but if due to time constraints going down this route is impossible, it is still better to have this information available then not at all. So +0.5 on principle (seeing that there already is a naming bikeshed I'm not going to chime in on this aspect). Best regards, George P. Banyard --00000000000052820505c68dae55--