Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105715 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60244 invoked from network); 15 May 2019 18:31:38 -0000 Received: from unknown (HELO mail-oi1-f173.google.com) (209.85.167.173) by pb1.pair.com with SMTP; 15 May 2019 18:31:38 -0000 Received: by mail-oi1-f173.google.com with SMTP id f4so106446oib.4 for ; Wed, 15 May 2019 08:37:34 -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=+pg5c5yuc3VzwrTHylfQrdI0l5b8QFubOsDJCplP/68=; b=YJhBhZw4e6FxCa15xJE23OF8x4p+U/a09Yzlh9qTNhv8M1UIO2WTDccr5e2eFkz3rU VeuyzYw6czTu2Piv8FpgscQn2M/dadG6/3jTTgR36ktB6DKC/oA3JY8s+qBvTb4sH2U5 6z1PIVjrQHFt1Yd9lbz9KvO5iUC8MYK1PdNCJ4HUdxHLqOfqQGJy9OMiPR+stpdFs4hI wxyuy/gJRZdzj7r2cksvT4jDq9VqAfo4PJ57yjY4Cfxt8ShWp7oqVPJjTYJElefsyn2V 0/BHi5H18k7Pd9lkFp+FJGqFqcjhaTQbuKDickE3eOkkytNNsdUiO/sq/UfLspTKc8Np Y6fA== 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=+pg5c5yuc3VzwrTHylfQrdI0l5b8QFubOsDJCplP/68=; b=Knp4d8+s+d6I6WFYX1PJ/C0C9hAIPiFKL7ztPb2oVFpZJdOnqjEqgk1kLCyvfCic8K FNJvxFL+oyjQUT994JKfEvqQgrU4M0y9n19QXzb9PkrRH2R0eocgAJe023cazbt/hIEc aH1jyKtv6mhD5NVIB0WZVdCaRlPtHK/qac67lW41DfpSwujp4uAS9AD7ddHc+8kBRHuY NMoAcAgoASdUtNmbmZY7IseLw4ge6/CsWwXclQ7gZA732Dy2BrNYGZL/orz32AVk4BoO pCfXWkF6MEnoFreEOlZRz8l8+pPDpd70xnPo/IiXgpkc4bCzch1HUsnkZ9GqzGrTgfxu ZZCA== X-Gm-Message-State: APjAAAVi1qIyFCgqz2TSpBdH6sPw+jdmR92CEfKNneu+tkIBN/1rVq0s 9+MeQB4uwIVw82i0Y2iBHXvo6rMIdtI9n2vLRt4= X-Google-Smtp-Source: APXvYqyEwwoXeqof+/wNyGFg0QoTxWJhKVCd2ZuXd+Y/q8/WDb66BQqdKCvEY2WwHi2KtAmYy0cdkHnpZGAEaxbLh5Q= X-Received: by 2002:aca:f454:: with SMTP id s81mr2252362oih.139.1557934653632; Wed, 15 May 2019 08:37:33 -0700 (PDT) MIME-Version: 1.0 References: <1557751737.2875.27.camel@schlueters.de> <65c18760-10a8-410c-ae29-d8d2d1542ec2@www.fastmail.com> In-Reply-To: <65c18760-10a8-410c-ae29-d8d2d1542ec2@www.fastmail.com> Date: Wed, 15 May 2019 16:37:22 +0100 Message-ID: To: Larry Garfield Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] PHP header files, restrict to declaring code only From: robehickman@gmail.com (Robert Hickman) > > That said... most polyfill files, of which there are a decent number, do some variation on: > > > if (!function_exists('coolness')) { > function coolness(int $coolLevel) { ... } > } > ?> > I can see quite a lot that could be done with preloading by executing code once, essentially compile time code execution. For example, choose which database interface is being used once, instead of every time the script runs. Or compile 'fluent call chains' into a more efficient form. If the AST were accessible, there is quite a lot more that could be done.