Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108116 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69128 invoked from network); 13 Jan 2020 22:53:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Jan 2020 22:53:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1DA23180504 for ; Mon, 13 Jan 2020 13:00:07 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (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 ; Mon, 13 Jan 2020 13:00:06 -0800 (PST) Received: by mail-ot1-f51.google.com with SMTP id p8so10317083oth.10 for ; Mon, 13 Jan 2020 13:00:06 -0800 (PST) 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=cg69JVcmN5LSM/RP7yVQKkxrkdnTIrBdkL1WHnA8a1c=; b=AyDGcsNmT0/OByPg/lJ6BSwH7LyHGNEGsqdcs6Yvtwdr1WAqvJX9akVHJ2BNkbfqqQ 2nbXl2UnLzOcaLq+vX/sSF8pGa5ebOUx/EzKNpuyDPS3oUtDkgAubDiTz7XmLxXoY8/Q L09sXR0pqqN6CyBzTC2x38fxDKaNQUntwblzIn+pK3zif1v+SMYavsFqDy8QCrFxsss7 K7oMed8DUGaW4OMx+BUeyko3JJi3QMUViodJbvAzK3fWGi8PfrUDMZs796FiZwuY6jPa DWjMFGaauMIy/UTWnNyUykMd1FRiabQW3n2VWb9onSAgEk19wJbPX+yuU0OXtWfAM+t9 acQQ== 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=cg69JVcmN5LSM/RP7yVQKkxrkdnTIrBdkL1WHnA8a1c=; b=kR2wLTNyt0HzNotQMEV/MfyVU+3SNIasnLM1q65JC1U+iGgdF5YIfyt6rQOv/0L2Uf p7fiUrHgDGTyNU8VZKqoeNm+WB+5x30QoaYrs3WLD5xqIxh1P/EiGom2gSYU5DWd2Yew YwHmjfsi1ldfC2y5LiyCl/n9XMS3wfgrwSNeVkPn8hY+fWnhSE1FqG0OTqj681ISsozo 7/J5eaGEAqY77MxtOXCY/ZcF4deCbkX71yecILO2JiHNZTlzpkkSVwnmzjHgqcBoDSgI VWJTfdH3v0GpfkgIwE7+x9vCoTXo8N/JBaJ8YQqXODrUxRYlgxelBu1Xmq2JYrm6raZK LShw== X-Gm-Message-State: APjAAAWEY4vLR6ztAEOfiDdiy4r0NYpHmnSaq6H/7dwtKcMj2iyjhzr1 KQEreYuE/ZK5tWjrESEyC0hJfl1Na8SYwCHm1JI= X-Google-Smtp-Source: APXvYqxLegtdP99JCfhRHP2Y/905eCXiSgAna6t0I3lMQNWKbxwzw7d4W120jLxZpwrZoQo8olEJvzn64fRL202rclU= X-Received: by 2002:a05:6830:1042:: with SMTP id b2mr14155774otp.306.1578949205292; Mon, 13 Jan 2020 13:00:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 13 Jan 2020 20:59:54 +0000 Message-ID: To: Mike Schinkel Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="0000000000007ffa93059c0bc267" Subject: Re: [PHP-DEV] Introducing compile time code execution to PHP preloading From: robehickman@gmail.com (Robert Hickman) --0000000000007ffa93059c0bc267 Content-Type: text/plain; charset="UTF-8" > > Hi folks, i think that we are getting a little confused here due to using the term 'preloading' for different things. As i have noted previously, my initial proposal of compile time execution would not depend on php's preloading feature, but could work, with opcache in the usual sense, or even without opcache, with a probably notable performance impact. The proposal is really to split the execution flow into two stages, one that happens once during compilation, and one that happens n times during subsiquent requests. This actually has no dependency on preloading and is orthoganal to it. I don't see any real issue with allowing ast manipulation and compile time metaprogramming myself, as it would just be making it easier to do things that people are already doing with preprosessors of various kinds. I tend towards the attitude john blow has with JAI: giving tools to experianced developers, and not creating ristrictions for novices, who will always be able to find ways of breaking something. Metaprogramming could be a foot gun, yet it could also be really useful if someone knows what they are doing. I have been talking about ideas with Mike off-list, and we both think that if a low-level API were exposed to allow this, most of the functionality could be implemented in PHP code. By making a low level api, it would probably put off biginners from using it directly, and they could use higher level API's providing more restricted functionality. Python has the ability to modify its own ast in python code, and i have never personally seen any horror stories of biginners getting into trouble with it. The API is low level and requires a lot of internal knowlage to use. With regards to not being able to use custom php extensions without being able to edit the server configuration. In my opinion the best approach is to get away from running the language in a 'traditional' virtual hosting setup. I have no desire to write code that would need to run in such a limiting environment. I appoligise for any spelling errors as I am dsylexic, don't have access to my desktop right now, and the spell checker on android is awful. --0000000000007ffa93059c0bc267--