Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112710 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78316 invoked from network); 2 Jan 2021 15:41:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jan 2021 15:41:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 18E1F1804C6 for ; Sat, 2 Jan 2021 07:16:30 -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 NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2053.outbound.protection.outlook.com [40.92.20.53]) (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 ; Sat, 2 Jan 2021 07:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hFiBZ3QvRTPS6ZqL6ZAu5FrzAS0mxcTexoWDdcXYMYB3QRfkAqC7PeSSXh+RQ6Jl0WmhE8Wn8nvzoIRTPuf6OArS4V2ASkMhgFw4dSgAk83NCuSdI6fCCRsxF2ysyqkTC6E+bViJs6BWxwZTzw6ioa3AY8w27kUFFx4MLYMp5I22/u4fcuJJ0G4ijFeFwxC2Gtp90c6si82XwxHkK5bexyIHUHN6ZzrnQWMgzi8NTOIFDlGYyZ+1YRHHtUMeOlnatUMzQ8UI/sYjvBjVVRE24ZFLaZfz9ZaBpmQeVQByRN72aUUXrgXNgVlLXyecAYoDP1VYAHaEQwh/sY8lpFAyJA== 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=ZRZDDLfYiVmQAOxleQA2sdttrPCpi2yitaMOeKubJTs=; b=e+8QkvPKfMO+rB9/zpaTienU3DhLdEC4stvLOL5fCTSxKrU9FwpX59kzeeeTnelDIXWuT0Ld7P2s1ERoVY1eLLsE9YH+dlICWUXqNDT6IW5xMF4NIGofwhpRLwXCFBncDuSbNaHa0KbNeOUQyncD9QTjal5XFDHvZqEMUcST9b6udPh4GHH+ywWhC2Q2Q9fB62rHo1i0S9fbzewuB6hDfxj2qnCitVIktGCvmMu0UL09VDf6rqdtHOAdIcg83rh1lfajHNJ+xkzJFehhXfr4/TY9OZ8Qyz2rKW9RGf9krVgzFxMmRPVghR8EQzracZwIB2lRWj0doTXTF+xPDGuGvQ== 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=ZRZDDLfYiVmQAOxleQA2sdttrPCpi2yitaMOeKubJTs=; b=q4iWCNs/fL8CfbNMMmjMIs91djd6ZyNv7ubuFHVD6j3PnROqjavzo3hr3oC0IkXVoBBnb5n0FluaTO58+I3fEg1qZ5Gp1LoqN82FwDvWGkN6/h1T/tl2ku4kEkJ1QXPrjyNYO4G8Gap7URmga1S5CH/8sTUm31m0QhSFMlnVXZvw+cXhAjglpFh89kn2udHK4E0reG0FGe/AY0eRoj4pgPVG4XNpZzDGZXq8uP7eDRLVWSMT1CqReIr8v+nrHo7eWfxrsaldINes2kjIEMkni1WKm/oLf6XRC/Ck/qbUaJyf9ufr79VzyxvtRC6XDOAVn/xfPdiCzPczmHTFAhMm2Q== Received: from BN8NAM11FT036.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::4a) by BN8NAM11HT058.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::374) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.23; Sat, 2 Jan 2021 15:16:27 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:fc4b::4c) by BN8NAM11FT036.mail.protection.outlook.com (2a01:111:e400:fc4b::424) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.23 via Frontend Transport; Sat, 2 Jan 2021 15:16:27 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::b4c4:dc11:5337:821d]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::b4c4:dc11:5337:821d%4]) with mapi id 15.20.3721.024; Sat, 2 Jan 2021 15:16:27 +0000 To: "internals@lists.php.net" Thread-Topic: [RFC] Configurable callback to dump results of expressions in `php -a` Thread-Index: AQHW1x7Yg3FUP/hma0qSEEKC7GDKEqoJfVv8 Date: Sat, 2 Jan 2021 15:16:27 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:D99515E68D44AD55BFFF6A686A845228170ABCF9EF7A11025B718787415E85F0;UpperCasedChecksum:FEDFFAD7095CC8CBCF2B1EBC2388B418E639926ED9D4D652103DBAB315F28140;SizeAsReceived:6949;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [pD1MRZj40yD459OKMg/rpy5govKGg8tu] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 48e1a89f-a7a4-46c2-6147-08d8af316068 x-ms-traffictypediagnostic: BN8NAM11HT058: x-ms-exchange-minimumurldomainage: github.com#4834 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Xpka/5hLGM34LlbLHTLj/1/8Qqy69DyzxBTzTPf4ZG0vBmf8WXp42Lfir8kvBkgerMVWqwYtYuApFK1ViUJlfpCcB+0iOMDhYNA4DvptwuSLwbWIG0zeN3DZShfRPbXCjyltwvSXMTyVA/bNUVW5mKQmUydkbCoqy1nz+daX+fM2VX28s7tL2e2/Netf72ISUSlc9a/+HsRnSoTAPON2i5qtCJIAm2mGrCuUTf3og5ly9LJtZazm3s0ol1u3C+5OiXhOvxu6kOrGzDqU2AIfWSk+6jNLAIPsutTTaWYjlIQ= x-ms-exchange-antispam-messagedata: ynHbJAKZKcOAj7H3bmUZHY8rHUczqIGgE2WYHhn2SHpQErWnsFGQ0khoghCaG+6YEod62zPUz+bL52nG4yUEzJPZ0bu+V4VpmJTXWBDz4XhJ5+Z3gafEDiVVGVLY9fAfjyryDCsn8XQ+9YgtPoo0CQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 48e1a89f-a7a4-46c2-6147-08d8af316068 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jan 2021 15:16:27.7457 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM11HT058 Subject: Re: [RFC] Configurable callback to dump results of expressions in `php -a` From: tysonandre775@hotmail.com (tyson andre) Hi internals,=0A= =0A= > I've created a new RFC https://wiki.php.net/rfc/readline_interactive_shel= l_result_function=0A= > adding a way to configure a callback to be called to dump the value of si= ngle-expression statements from `php -a`=0A= > (and an ini setting that can be disabled to prevent that callback from be= ing called).=0A= > =0A= > Many REPLs (Read-Eval-Print Loops) for other programming languages that I= 'm familiar with=0A= > print a (possibly truncated) representation of the result of expressions,= but PHP doesn't.=0A= > It would be useful to allow users to extend the functionality of the defa= ult interactive php shell (php -a),=0A= > possibly with auto_prepend_file or through use of command wrappers/aliase= s, or after loading the shell.=0A= > Prior to this RFC, there was no way to extend the interactive php shell i= n this way.=0A= > (I've seen https://github.com/bobthecow/psysh mentioned as an alternative= for php -a while investigating this,=0A= > but that's a shell written from scratch, and doesn't have some functional= ity from php -a such as tolerance of fatal errors)=0A= =0A= A reminder that I plan to start the vote on https://wiki.php.net/rfc/readli= ne_interactive_shell_result_function on 2021-01-03=0A= =0A= Thanks,=0A= - Tyson=