Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113039 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86369 invoked from network); 1 Feb 2021 15:57:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Feb 2021 15:57:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4CEC81804DC for ; Mon, 1 Feb 2021 07:40:10 -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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2105.outbound.protection.outlook.com [40.92.51.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 1 Feb 2021 07:40:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iI0qvbgtOEJnzXnfRNwytufp6A757iYsmuRw+2ji87dqw0VQdagCNgshYYM4pHkqgdcMlv2Q2kQ+GIsGr4N9/YQrK5vUct3FxgoFvLLFI541aTeQPih2eSMxzLHW7ftqlHIu8JSHwUVGErUE1Cbwj5srFY/USRpLKup2flPBXNG+NrWK54grYrQKnsOfpoIIUCCuHrAZA5rPnfRSRFO8nkOJu9lc1pgSDuf/pcFJF07aewjaPX39cIeeohSPe0lgH/OTIu5eDsJX/A5Ge4+ZHreu1IquFjs7ak88fZxB5yul7rCeD/j0CZ5pneZRaS/nkM/MMRDYJZRSGlD3xJ3Hog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Px2HlByUdt6N8W9W0TK2n1ICg4VljkKGJ2Vu+kZsQH4=; b=bCeDFZlueTWE4iXCu5MUi6aXOYL7Es8gfAK9owOYmbjnFL3SceIHxV77w0UUu2ix+lu7xDlT9t5v6soadSYhAIAZ7eJQ1mrVb0clr2IgL6PiqJQY3aGNlg66sjFzW+d4sGLYTaFAcN8Xmr1qE0Ba6toeI1tBK7Z5rlf92X7n7ZkW0Ozn6qdb83gEG5OPZGOTvK6f8gg1kPGxafLoVPFfMHiw3bjKMAVHc3XC1TOh9K5/umGM/5mLosys61HnITbF6qS/Fo7a6swHMV4ZT59K0RCkDbThxy726dk2THy1VAKXZtKuLssyGqfzA1ybp+UmbN8ZC5e2tMkigqaMdmubUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Px2HlByUdt6N8W9W0TK2n1ICg4VljkKGJ2Vu+kZsQH4=; b=IPxO6jTCWQz5lyLo8ky8kUz2UYN0q//eWqZKJ0tfIEzazy/1umwAvAnI1jQwWoS66xJdkrdxd0gXwvf5/EUSxCt8KogLau5TcqcdHdjvti2VIU0oVO51Fm3rROjQmDA7cenVG9SnbrNpiVglyzT/Qt+vPjBL3y4emvP878jk8wg3TVSl+LlNIAaA/mTE8wHjFuHCuwbBCCwQ0bobcsOSeIAtpomjex193GIrcxyPxLJlIaM5VsneNgkgipUmEMwkQgvH6H/x99bpXHissvr9BtwpJTzdeN7bMJiuw0EzghtLQ6PskyrmjcnPgcGSFql7VRTIGDQige3xrSovk8udwg== Received: from DB8EUR06FT020.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::45) by DB8EUR06HT247.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Mon, 1 Feb 2021 15:40:07 +0000 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com (2a01:111:e400:fc35::44) by DB8EUR06FT020.mail.protection.outlook.com (2a01:111:e400:fc35::262) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Mon, 1 Feb 2021 15:40:07 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:221DC405983F85B1BF21E0E2E29303F5EEB748CC061AA3762C1A896EC8D06518;UpperCasedChecksum:01E1CED39275F61B8882EDC0E6E52CEC494BABA3D7F9F0DB40DE6962E0350DA1;SizeAsReceived:8803;Count:47 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::e158:41d3:b378:86e2]) by VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::e158:41d3:b378:86e2%6]) with mapi id 15.20.3805.019; Mon, 1 Feb 2021 15:40:07 +0000 Content-Type: text/plain; charset=utf-8 In-Reply-To: Date: Mon, 1 Feb 2021 16:40:05 +0100 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: To: tyson andre X-Mailer: Apple Mail (2.3445.104.11) X-TMN: [oQzWYs32RNVbp6WgY4MSAIX6XqvJ2GU0vvyYKa3+jPMbL39BpwIP7TGhy6zfRq/j] X-ClientProxiedBy: LO4P123CA0080.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::13) To VI1PR02MB4703.eurprd02.prod.outlook.com (2603:10a6:803:8f::13) X-Microsoft-Original-Message-ID: <42E4C037-D948-4A92-AEAA-BF9A7D70B608@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2001:7e8:c83a:5400:e90e:fe81:be2c:8c39] (2001:7e8:c83a:5400:e90e:fe81:be2c:8c39) by LO4P123CA0080.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.17 via Frontend Transport; Mon, 1 Feb 2021 15:40:06 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: a6a794f0-5c25-412d-dead-08d8c6c7a6a5 X-MS-Exchange-SLBlob-MailProps: K3wx5smWY1PwvgS5FL6c7RmtiLKqTG5sS9tsba2MSGHsWmosyPrdAw/H2vbm5hlsmorwzGUYQOmF0OF/PnpUg4VZMA+IGj1+17j5Y6WcsFNkgtDdx7gc4D3Ov6VtnPhJk/+HTwJIrOlq09EgXziUvJDU02baLxepnejA8EHIEItcvp8GB/MiGPIJ2ShF+fwkRuDIFtT+EMRr5Hjavk2gh5UN86/uh8a8Wrjmr9eK7pMy/PNx6e0Dky4j+PcGLk1ukdiw4R6kfPdnvswt/zFa6KE4AAE2QvFgS5OWC464DZuunUCgzRV1wc8oD6SM4LB0ZrndsIZlfuYqAC90nItLPBuSjJJELOkB/i8Tt0ddQBXQGbihwTDQdjgqaAbvSm5re2PLTsf+NMvUEjh1NBbaOhvixKkBeYvjZKGr4XbTNlHQ3CHEcRSg8tWjjZJeDN0Nm5rKL98dcNpHjBaATWPpI2AecekxJxUWfZA2uybVlUhMUVnI+/0aZFWJa6Z9VRpJNuQzDwAjijckrkRxLziWuzN2oNqqWIOiHJL/9kZF2/PbdyzAwIn8YJg9qXAwjLMAyYu0boLCO8IJ9D2bFyha0ugCE/6DimUHDyFzWYYSf9JLIBrm1NXhQEIENF4ZKm9kCTM9t4Xlps/iD3Vnv6/PGIvaqV6o4iwvWgztz9H26zhaMqOlB8go7XR+ubx0h2po5fG0RVYycqxtV+Vw7KHlYVpUTFCl2dLf+CUHaBe1GaeaifKjQgBUIsMhDdAYzuZVRb2RUcxTyXWEyDqjR3/CNSOjahRPmKnpbCekKUcBbcWxIiD6E4xhUQ6r3QWx2eWHdq28FRwiSvysLBmM5OVkOSaBAWajZcg5TC+2axD75HvloNAf3INel7Ss20zP08fWTGl8FQsLvuvBvZaIIpp/mZ1gFNJoIKz3lKnljQFPeuM= X-MS-TrafficTypeDiagnostic: DB8EUR06HT247: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PyBHId5XeW0s7vhuxUaxDotI7tMfpNnXKo9UCpcX2UlGQMSjic1K5dTDg9wOKpccrJbQqOKSVV1ePukLuAl6Bqn7eU5YamysIJqyWM5CuQpLIlgBPzJmf+Bl/n1YVzGLevv/2rBXlGPtkJuMkkg0nKffVNC6Z26L1oMR5x2bJ3LjzjKpPjT5w+y1F4kqAicrmnhe6hpnrTGc57GeBCT4ic5QpNxkL09TdrNUyZdMEDAKaw7568pb6D6AcWIK/1qIbynvrx6L5oxtvwAE3ri6il2euRuckgHSqfKofEG7snxHsz+F7e8W11YgCIGe8bo99I3DsyF41ENufjRzAtgZgQ/4ihZ1ZGQy6FVF8Wet7FVu2mzeWyB/Tq7CBbEHkEhf5GurKG3E4NtsQhOiYgh3AZe+kV4SgIQ/CqZJmYth6IzwSH/xT/pjHinlNksTtJ3U X-MS-Exchange-AntiSpam-MessageData: KerD8A9QzLeClUjBsdzeCprmx4rKEzkCzpNw+ceWKiyHknAi2THu+ME2j5og5VQdAn2SL5WXQdi9mo/mbPeDy9C3kdcxJ7nBDSgPhbxFLKXJD9rH0EKZPk8wdWXCZb+BAnxZKYp/d2nAqqqQLHVPpP5TIjTXesmcp8Ku/n5d7aJosYxXvca6Ki2bFcrtBa1k5wusotgQNvFZXftvkjKNNA== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6a794f0-5c25-412d-dead-08d8c6c7a6a5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2021 15:40:07.4322 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT020.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR06HT247 Subject: Re: [PHP-DEV] [VOTE] Dump results of expressions in `php -a` From: bobwei9@hotmail.com (Bob Weinand) > Am 20.01.2021 um 01:55 schrieb tyson andre : >=20 > Hi internals, >=20 > Voting has started on https://wiki.php.net/rfc/readline_interactive_shell= _result_function > on 2021-01-19, and ends on 2021-02-02. >=20 > This RFC proposes to dump the results of non-null expressions using var_d= ump/var_export() by default in `php -a` (the interactive shell). > Additionally, this adds a new function `readline_interactive_shell_result= _function` to the readline PHP module. > This function only affects interactive shells - it can optionally be used= to set or clear a closure when `extension_loaded('readline') =3D=3D=3D tru= e`, > but that closure would only be called in interactive shells (i.e. php -a)= . > (That closure would be called instead of the native implementation with t= he snippet of code that was evaluated and the expression's result, > if a php statement contained a single expression such as `2+2;` or `$x = =3D [1,2];` (that could be used as the expression of a return statement) > - Dumping of expression results can be disabled using an ini setting or a= t runtime=20 >=20 > Thanks, > - Tyson Hey Tyson, My main concern in this iteration of the RFC is: what happens with big/deep= ly nested objects? They tend to spew tons of lines if var_dump()'ed. Do we have reasonable dep= th/output limitations in default dumping mode? I'm often enough using php -a to do some quick ad-hoc processing (example, = read a big json file, and then access a value; instantiating a mediawiki bo= t framework and calling replace on it; ...). It's really cool to have any interactive feedback at all, but please, at le= ast by default, limit the output. (An example is the JS REPL in browser con= sole - it shows you a minimal preview of the object, and then you can expan= d with your mouse. Obviously with a pure cli application, this needs differ= ent - intuitive - navigation.) As it currently stands, this makes php -a unusable in any but the simplest = cases, without just disabling the whole feature. I like the whole feature, but the missing output limitation (I have yet eno= ugh nightmares from var_dump()'ing the wrong object filling my shell with t= ons of irrelevant information=E2=80=A6 I don't need that potentially happen= ing on every single evaluated expression) Thus I'm voting no, for now. Bob=