Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112737 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8397 invoked from network); 3 Jan 2021 19:08:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2021 19:08:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EF21B1804D4 for ; Sun, 3 Jan 2021 10:44:35 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 ; Sun, 3 Jan 2021 10:44:35 -0800 (PST) Received: by mail-wm1-f41.google.com with SMTP id v14so15357195wml.1 for ; Sun, 03 Jan 2021 10:44:35 -0800 (PST) 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-transfer-encoding:content-language; bh=ukD5L5ZsYUEKS6vKVOjQvyWxOijzk4swRuFGE4Lnogw=; b=rrYWQYp6DEAOwrmf/6IQZdwxcm6pfQqtAx+vlzZUn5AqxdluN+IbBYBtlzltfnOM0i HS2ux8oriWFxF7iaigpryZ5Sq/YvOobeDZ6SdC5x+TL73qXUHLpQg/JqQgnvQ2wGhCJc H2eTs8Bgg+7BVqlrckpDnT0C51J8pS3YpakQIc6Tnwwy8Gue+CfSM8pr7t7n9fjr+07j 6OJeypJytH8c1B/uGjnAai77VylGQlALuaMZYxt0rvoRXKZEDxQffTkbGhOE7sv3KO2Q jXpyG7IwXwlDIUalf4THJR3VQLrI8DY2sgqdrCuXRX1PF845RIabpp7dY1En4c7So1lx WuTw== 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-transfer-encoding :content-language; bh=ukD5L5ZsYUEKS6vKVOjQvyWxOijzk4swRuFGE4Lnogw=; b=EMAgUEE1sCqHojK7P8OhUyu8Nj7oVBZXOwyzBO1c0X0dtpf+50qFNa/+/0XfYa9GFA l4UM+9KDtuaOScscaP11nVHxYxXOP+TNMwM4Zuyhs0ZH9Bq/jdkD+hSU6/oWc/dXoqPm Gs4uOnJND5kwoR/gJ/0d+/EF+oU9KwB+tH4qsQpbplAvU/Cdrp+A69ViQl27k3jjwVtd bYoMqNn8bOZ290/7knuWKUvnMvuNr95+lRSikTFhSwR9yVIke3SJqrMY71ZWQQW1iftY u4lOrhhAh7nZOVaI/3e7tI6t/Crx7COGDjoOH4j9ZBirnV2uDQnPHV1Z27ifywyNske/ 7b2Q== X-Gm-Message-State: AOAM532HyK+9FFiZZ9YrVdvgwCaN+S1ryzCwWUZpBoP0hlkNt3TeICz3 hrZSs4p1qNy9dAuaToKizOm1Hej1hTLq8g== X-Google-Smtp-Source: ABdhPJwWOy0WWfyYIQr68ZYrOz1tkGijA0IN8jAtPNzmRbToC3M5gP9yG3xP/VSVOCYBtBdhZAD+jg== X-Received: by 2002:a1c:e902:: with SMTP id q2mr23534284wmc.143.1609699472751; Sun, 03 Jan 2021 10:44:32 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id r20sm27636981wmh.15.2021.01.03.10.44.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jan 2021 10:44:32 -0800 (PST) To: internals@lists.php.net References: Message-ID: Date: Sun, 3 Jan 2021 18:44:32 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a` From: rowan.collins@gmail.com (Rowan Tommins) On 03/01/2021 16:11, tyson andre wrote: > - The benefit is that dumping the result of expressions improves the default experience. > psysh wouldn't be installed by default when a new developer is learning php through the php manual, or when sshed into a remote server. It doesn't feel to me that you've really answered Nikita's question: if all the code using these hooks is going to be distributed as userland code anyway, then they're not going to improve the default experience. It feels like we need to go in one of two directions: a) Build a full-featured official REPL with all of these improvements completely implemented out of the box. Limited extension hooks might still be desirable to build custom versions for frameworks etc, but they could be more targeted - for custom input, it could be "register meta-command"; for custom output, we already have __debugInfo() at the class level. b) Expose the magic behaviour needed for something like PsySh to do everything `php -a` already can, and leave the rest to userland. So far, the only mentioned requirement is a special form of eval() that swallows fatal errors. My feeling is that the current mood of the community favours (b) rather than (a); the most obvious example is that PHP used to bundle a PEAR executable, but Composer remains an entirely external project. Is there a reason not to aim for the same "de facto standard" for a REPL? Regards, -- Rowan Tommins [IMSoP]