Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104839 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41212 invoked from network); 21 Mar 2019 13:48:15 -0000 Received: from unknown (HELO mail-io1-f50.google.com) (209.85.166.50) by pb1.pair.com with SMTP; 21 Mar 2019 13:48:15 -0000 Received: by mail-io1-f50.google.com with SMTP id c4so4783466ioh.9 for ; Thu, 21 Mar 2019 03:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=IcAFGycYqlsIVmm8yDeqPJPsE8LzG5vcicOPowAyePw=; b=qp+i1eUdWSjmNCeMdaKRVxlodHAHFRPXRsHvh+5LdyVgOt1NoqiU4rKpwcM1sMmfk8 T8X0ZnPJcxVJMKJTy38gElxii/WJhQnT1RNn3pogzguaTl6n9ju0ukVq05sNqCLxnb59 +Gwsfri0vcGmmBDp3eBLsKrS2DwnkbrmrpmBX9Qyaz4UN3X4eEGmqx3sr1UBiX7ZU+zM YBop7Xxf9h7iGM7J8AxNibeIKGYFFOyB92R3ixbPGU19yU4xuykiAjsNVzb82vR/Ao51 QrhQx6ltFPKu9tRPCEEjb9vH1N7OaoDaKxwMj+6nVmnFsDgmfSjHLACd33T6olUiZScZ 1Tvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IcAFGycYqlsIVmm8yDeqPJPsE8LzG5vcicOPowAyePw=; b=CXdngctcMYNHWIw+h5QmhuZfxUaPmc+rwkKUnAt8Ro4Uj1xsQLFmNNs6QxQpVxA/ez HhKcxUvLxaJ4x0U9hDwEghzNuMRZ7OoavaF2MbX/cI9/fdfd+/mx+4/k7GWq/3jGiXP4 lTzELrJmdtON0t5xRlNK5aeRwcQfrhPGXTZyY1nL8mheSukv0i9mqC4dh3bfwnA95+cQ yAAMcErMDOfVj4uKUulrovmrwIFsDvIQ94OqOpb43sPrnljXvedxzENGD7vu+vpaUt88 n71+Cl4YHLNm/TLiEsIGC+xMcWnHjVtO5vsRoL4hD6jZHsEBVYyx5ySzUNjPRF9BMhqn KhKA== X-Gm-Message-State: APjAAAWkZuaJynVta+SatI5ztagtv0V9hYqpku4f+NphOwQPWZ3c8ZOj /bqiwJ5MaNLD8HezYxrpiudYm+q0Bk8N7zutxakA9JH4IV4= X-Google-Smtp-Source: APXvYqydpZzkCKVsVxZIxuyRKGYBaGrFKCTiwUthJBBBUVFfDRSWtFIw8lSk4pcwbf7CUrx/XopPfH+dWE1iFQ3Z25A= X-Received: by 2002:a5d:91d3:: with SMTP id k19mr2119390ior.258.1553164821972; Thu, 21 Mar 2019 03:40:21 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 21 Mar 2019 11:40:05 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000007dca3c0584985d30" Subject: PCRE callouts From: nikita.ppv@gmail.com (Nikita Popov) --0000000000007dca3c0584985d30 Content-Type: text/plain; charset="UTF-8" Hi internals, PCRE has support for "callouts", which allow calling a custom function at specified points during pattern matching. This functionality is documented at https://www.pcre.org/current/doc/html/pcre2callout.html. I've implemented a prototype for exposing this functionality in PHP at https://github.com/php/php-src/pull/3970, which also has more information on the API and usage. One use case for this functionality is in junction with auto-callouts, which allows tracing the execution of regular expressions, exactly as PCRE performs it. This may be useful for debugging and performance optimization. I've included an example for that in the PR. Regards, Nikita --0000000000007dca3c0584985d30--