Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112057 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7936 invoked from network); 14 Oct 2020 12:03:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Oct 2020 12:03:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0CF7018050A for ; Wed, 14 Oct 2020 04:18:45 -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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-Virus: No X-Envelope-From: Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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, 14 Oct 2020 04:18:44 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id a3so4227017ejy.11 for ; Wed, 14 Oct 2020 04:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=jJ3Op2xbJUuEANLAsMjGSKw5IKGDIJAarTL8dD+S7FM=; b=sS2X84VeDkD2VA0ED7Kr9duMOaROJ5o/5A0iyWwcuqwy8tjrd19ZXczmNs2sib35f4 OKITBddmcTVBX5uM+9cq/QZ8sMGTlxzbGrTXlbRRVHuO0J3zzi8iPIj9g4ueQBN4oWFU u5qE8ALqzELBuRqcNBHefALc7alwVUow7W/gYcEuafaNcBh0JDKhO94S/QxOI4sTuy7t c5W15Ia4CYXwZUrOwwAolBXfuOFlCmx/6QgfuRuvhxCXLmiK/Ti9tz9WBeGp3/KwBqFz zODK/SqQGA2e4E4xIgjkRjl7ASZtegMe9ZqL8zZ48pu/ppnwZHpGSCEaPp+SXwQhkQIi 9x1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jJ3Op2xbJUuEANLAsMjGSKw5IKGDIJAarTL8dD+S7FM=; b=WRPjFOMoBU0tR5HW5mhdfulnBrIzNs3sTSAwJ9wKQg7ii23BMWUacaEDzWY7+FodFE NcRyqmgcYvxvbk958FvXqlHcNLLpEWonOoH01pI2WVB8UrMd/nl0WeTisousJBFRAuEE y5wdDbwiW+PqCdj1Zv33za2JxU49N+IihQhYDES5adqiHdQq4mk5zBZjiBFfqS/0vrvp V50x/7PDR/+AwBUToSQvADmyr2cHvmScmQs/b35Y2HBGxFH4q743VaU9gBLnHyVkoq4w nssPPio7OkZHrBefx7RN2iwoDDwWG07uuQQsus3RvEt3ri5OxpNw/WtfKAzOwxt2Ok2C KpFA== X-Gm-Message-State: AOAM5324mxm+Xp0v4BZcfuebfoeKvW5l0EiAhne+YG4+0Zt7SlDAqIfF SnlekrbEhuG4PuituOKWjYudB/txnaw= X-Google-Smtp-Source: ABdhPJyHcsmFsejycHe/oYZ4ZQxy676szUiAENKSrILNp3W3OTa9f5B+E3k8mHeMOQ8yqw1areR4lQ== X-Received: by 2002:a17:907:2056:: with SMTP id pg22mr4814402ejb.177.1602674323043; Wed, 14 Oct 2020 04:18:43 -0700 (PDT) Received: from ?IPv6:2001:983:6fc5:1:6c0a:7d1a:eb5:321b? ([2001:983:6fc5:1:6c0a:7d1a:eb5:321b]) by smtp.gmail.com with ESMTPSA id x22sm1515776ejc.102.2020.10.14.04.18.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Oct 2020 04:18:42 -0700 (PDT) To: Larry Garfield , php internals References: Message-ID: Date: Wed, 14 Oct 2020 13:18:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 8 release announcement page on php.net From: dik.takken@gmail.com (Dik Takken) On 14-10-2020 03:41, Larry Garfield wrote: > This sounds like a fantastic idea. The inline-run capability of Go and Rust's documentation is a huge win. Writing good sample code for the documentation would be an interesting challenge, but it's the sort of thing that can be done over time. I second this. However, then we should also make sure that the example code actually works, and on which PHP versions. As soon as examples can be run right from the documentation pages, the examples will be run far more frequently than they are now, simply because it is so much easier to do. Broken examples will cause more disappointing experiences. I don't know if example code is currently tested automatically. If not, adding a sandbox for running them may also offer an opportunity for automatic testing. Besides experimenting with example code, a sandbox may also be used to expose runtime information. Think of generated opcodes, the JIT compiled assembly, the AST. At some point I can imagine adding a documentation page about performance, optimization and JIT. That page could enable users to see how an example code snippet is compiled, optimized and how type inference is done. Change the code, change opcache settings and see what happens. It is interesting to toy around with and it helps to get more exposure to some impressive developments of recent years. > The interesting question would be how to configure it to ensure it doesn't become a security issue. We'd probably need to lock down the environment's ini settings *hard* to make sure it can't do any outgoing communication at all. Trying to lock things down will also limit the example code that can be run. And we run the risk of overlooking things. Maybe we could learn from other languages, how they set up their sandbox environments. > If we need hosting for that, I work for a hosting company and we're happy to help. I think we all highly appreciate that offer. Regards, Dik Takken