Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112984 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50022 invoked from network); 25 Jan 2021 14:59:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Jan 2021 14:59:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6424E1804CF for ; Mon, 25 Jan 2021 06:40:40 -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.0 required=5.0 tests=BAYES_40,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 NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2042.outbound.protection.outlook.com [40.92.23.42]) (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, 25 Jan 2021 06:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KCWjjh14ARkm7jZrDvV9m6wlY8hjDmTs4VDCoYuh0ZdQ7WLIZ582TbTlNJUr7BURbBb6m405IgKQZj+EBDRpuc/KhNq6I1nXBlObIfmQdlhk6q87H0YGZsQyH9OnoTikwyoNC7rnKawrjjXIl5+XWJShp/Xq/394maIdZKb4WcJQQMraBHAbmbuHHeFkUJSSMrbROaDCssgN4PBOprdhSUySkjbeM488PTrW0r+3t64S4T/xq+9lHEFlbgPb/W3mQtPeuK8fn6hI0KLjkmA9wxb4VF+4NpQrL0PrYpNtOzpRqwBpeBWGoqmNAmM9dPCYklZz7YB9RPUhb/j0hsX8Vw== 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=2VEjP843QN8GujNLaYl8YzPJbIT4ZgY+FISooePQC9Y=; b=T/SkSDlt6jv8jNvnrEgwJjK5fgd3k35kAhDC42r+ys9blzt6yiZcaxMe4/UwRwYUtW4Yxn/VnUqf6USSArl1hflD9vIr810Gst75IkoEhxYy79W9qitLYcfWjUdbqZ/+ry6dmSrwlfAj1tgz6r3Rr9GD54QBCfI18UrulPKRXJGMzPA9Yxe534mB2ajUkV1siyLVSC8DIYuCkVjek/R/sojVSpxqOgwexU5La3p56fNLIA6WdSRGfbk2wPl9aJfGhMGUYDkKGUfrVN6BaVpGGRV/zVkaZjX7cWAtFSuyzTkQyGubb+aYoM2OPhS9tjP+tre8qgIRSRjEKFYVMYPOiA== 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=2VEjP843QN8GujNLaYl8YzPJbIT4ZgY+FISooePQC9Y=; b=pL7Df53EgDYsyy54t7l2PolCwzqsOEQdOI46St6s5tAvJF58lNIBTPrA9vFZCXH2LjWym5Fha21VVg3YE67z+9MoSvCmAmbGBD74hudmsrtCP8okj3LBeUo1ecNCYQBTHgVxyDdoBYAKa7N7LKRTJqq+sWBOOXZ0LLFNinqHiSdnlacfEvavqQlE0rjplhIDIZp4dPcyQbTO0c9q/JxMvvpFvNsGYWcpeuelnAm2ammmMjSYv93XHUK4ejX5SuJn1/zSvQ5+qeFCPw1WqQ4wikUX2Vh/DnW87NxV7i+BUrVqC4UWZMAVzduM+01AP9ot2aJfe9wmvSnjSZYVMxEhzw== Received: from DM6NAM12FT033.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::49) by DM6NAM12HT192.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::406) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.11; Mon, 25 Jan 2021 14:40:38 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:fc64::47) by DM6NAM12FT033.mail.protection.outlook.com (2a01:111:e400:fc64::270) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.6 via Frontend Transport; Mon, 25 Jan 2021 14:40:38 +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.3784.017; Mon, 25 Jan 2021 14:40:38 +0000 To: Rowan Tommins , "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] var_representation() : readable alternative to var_export() Thread-Index: AQHW8R1wWWGP+37l0kiexDpDbUAmVKo1egmAgAAyURKAAR7sgIAAHRckgAA4DACAAAC7moAAL94AgAAYDwA= Date: Mon, 25 Jan 2021 14:40:38 +0000 Message-ID: References: <5ae166a8-378e-b3bc-056a-8ccf4f3a1ddd@gmail.com> <8e5d376c-0d7d-bf1b-bcca-3f8c4c737a22@gmail.com> , In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:173D74BF48E29DDABA93CFA1D4E321E284BD27663DD44CDB2102864288D49033;UpperCasedChecksum:A200D268BF4742DEB3975C3EBA918C27D135CD430C2F7B1C93AB869911456EE5;SizeAsReceived:7627;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [S5/jX+lnd/P0vbz8E5DtnRffufcuJ3Y1In6xGlbNRH+mOouyvgRqF0txM0KpK/iD] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 1eb5b467-a265-4c71-7117-08d8c13f2e8d x-ms-traffictypediagnostic: DM6NAM12HT192: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0ad4XQaFV1VZqMQLI/9W1QpDsM7yS8/M+jEqakP4XGeCQc4TBPlQr/dy7Enztnxo1qvdvyd8/38axwzAQutbuygHB77c1IpGdWRsB1yaNwveTwUM/NnM8P0zJFBNKru9xtdNCFwRWXaRDB4tgU7TDIKx4Fjtt2mseFxheaLV9O4+mEvd8lz4HXMY4XIQATHyo7Z0/39cq3WDiMkyw93j79p9PJ9zRqzMa92dDbBjXNP8ajlhcC2x+EALkBSKqUdE9kn+ookIwn86U/70Hm6SJJ/GvBy43KqOVYpA8W0xJ+s= x-ms-exchange-antispam-messagedata: nWhQ0skH96/MYY8ol/58df997X350uqMpqlWFJjL5Ra7+J8NE4bMoYiBZB6CMj4E9bq6WTGOoz0H8fzGyt/FU1srZiQ+jxQ8Qzvf1imfLCIOXVy7GtOm7UV59/nySzeq/I0jJg0iZIZ7tlOmh4FUKBDDQRwrDh/gJXQszacyfxMx+LZL/WOli341psm/wKFbiSKTmakT650OtLxSTulw1Q== 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: DM6NAM12FT033.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 1eb5b467-a265-4c71-7117-08d8c13f2e8d X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2021 14:40:38.0437 (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: DM6NAM12HT192 Subject: Re: [PHP-DEV] [RFC] var_representation() : readable alternative to var_export() From: tysonandre775@hotmail.com (tyson andre) Hi Rowan,=0A= =0A= > > If a php developer is learning the language through php's official manu= al, official language reference, or through an online tutorial,=0A= > > that would have sections showing the different scalar types, examples i= nvolving objects and/or arrays, etc.=0A= > > Those use var_export/var_dump=0A= > >=0A= > > https://www.php.net/manual/en/functions.anonymous.php=0A= > > https://www.php.net/manual/en/language.types.string.php=0A= > > https://www.php.net/manual/en/language.types.boolean.php=0A= > > https://www.php.net/manual/en/language.types.object.php=0A= > =0A= > Every single one of those uses var_dump, and I see no reason why they =0A= > should use anything different.=0A= =0A= Sorry, I misread your comment as being about the family of debug output fun= ctions as a whole.=0A= =0A= I'd agree var_dump is the most appropriate for these.=0A= if the manual depended on printf or `var_export(); echo "\n";` then a devel= oper new to programming=0A= might have to read the printf documentation or echo documentation or concat= enation documentation first to better understand the examples.=0A= =0A= If php were to add a `puts()` or `println()` function that would automatica= lly append a newline=0A= then that might also work better in tutorials longer-term, e.g. `puts(var_r= epresentation($value))`.=0A= The fact that php was originally for "personal home pages"=0A= may explain why this isn't currently part of the standard library,=0A= since newlines are mostly treated like whitespace in most html elements exc= ept `