Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110748 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73899 invoked from network); 27 Jun 2020 19:24:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jun 2020 19:24:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 372EC1804A8 for ; Sat, 27 Jun 2020 11:12:56 -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.0 required=5.0 tests=BAYES_20,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-ASN: AS8075 40.80.0.0/12 X-Spam-Virus: No X-Envelope-From: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2047.outbound.protection.outlook.com [40.92.23.47]) (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, 27 Jun 2020 11:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MlHDSKqHMRh0PqZnvsdI4W3dFofhDyCVGSleXaEP6ikIXYwo169KQiBkR2uMi5XPcz2aejCsZEw/07bc3uaf//4ZDvCyW3vj/fQl4yea6Ip5iH30fjpBqD2oS43v89/m7v1Wblxl63oUnK1iOU+Nlpr0QKdfZgLdeZVmpDM/7FAu5NfsH+cVoaF5XC40DSCL2w+Aeakb4I9v1e0HJLoOQHx5NsHh1kqsxtl0EZZoAtuNz9t9hwn83u5JHrY10/AfrHmzVkUvmS2Zo8bG8SNe5lssyixSFN8clQJdSCprHfDDbsV6OTyFEtG170anKVbqKDKT0aI27Ph8cFpwxCRLYg== 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=MA4luljIANH3Xmmzdw9sOwj9IHV7xxZgQE7RMrgJ8c4=; b=MsztjGrAj0DGrZ0FyuCs/bhmQeiNm4UgqpVPFhwYAOyAwhmEW0YUQ9QaJ5TgVqNbgBJqKHv8mYFMP20vzgcJrqkf5pNnmL6ex7HRVZPI/3MwEZ3Pqm+/xQkWJOgvCopQAb+33J+nNCayr4i/zCbpwqw94F59GMjBGCSdrI1b3C0K+RkxefrwqCYBkUg3+feonQ+KbktT3Tn7G8tFYy+X3BmAhy4b9DKwVasAp7EBJnwmV+6Nh1jvebdgf9Vb9H1vMAHQ4QkMqiDqBk0tcrXhFoywHTq+yBH2MOHOKq+nDr3TANkz7bPzBT28DzzDkCjziijug9IimGldtnJdo9BCBA== 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=MA4luljIANH3Xmmzdw9sOwj9IHV7xxZgQE7RMrgJ8c4=; b=ETkWX7mZQUYKE5NolcBlojOPBYGy55Z8YwW4I+eZmNbFRy1xFkUtIiXp1Dw+rv+nNBoUAA/uo/dIxGogkwxz8d5pKEs++sLaToMaVwMio6fAgh9b9BnUtmApPxN9i9t4y5o7hMeCtdBM1Gn+gQut/CybiRydU22kM7rLqPyCTJSC5vdhxlEZEV5lJnaJfZiytMS4+7dJIVoXOuTjiQbSX0FgfHeM+jL4p0V1cqKhX7Hn+FQA2+QxSgDzQpJASMrVtEc1xDe8s16KMOSzKLBy7ldZzNsglYVCD5N8YF16sRRQOt8zDwyITc3YFila/hlsypDosdBLZp/VBcS10KMFJA== Received: from BN8NAM12FT061.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::4b) by BN8NAM12HT113.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc66::373) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.10; Sat, 27 Jun 2020 18:12:53 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:fc66::4e) by BN8NAM12FT061.mail.protection.outlook.com (2a01:111:e400:fc66::175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.13 via Frontend Transport; Sat, 27 Jun 2020 18:12:53 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f0c8:f413:c7c1:e934]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f0c8:f413:c7c1:e934%4]) with mapi id 15.20.3131.026; Sat, 27 Jun 2020 18:12:53 +0000 To: Dan Ackroyd CC: Internals Thread-Topic: [PHP-DEV] [RFC] throwable_string_param_max_len: Configurable string length in getTraceAsString() Thread-Index: AQHWTJP20y5MXeHBqkCn3pDlPjOL5qjsoo0AgAAeMkM= Date: Sat, 27 Jun 2020 18:12:53 +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:4F2E1119153D918985E7E50B8D0FA781B31E5C32F7A09946D28208A7FE673C23;UpperCasedChecksum:CD5E043769BEF592F25DE2E68F9501419A1263EE4B0327251909A91AA222D2E4;SizeAsReceived:7261;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [NYk1a00YhrmowEXsnlSB/bLBURI1h3O/rbN9cGMSQXQLhv0PCh8pGYuSoxQWz23X] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 1155bdb3-bdd9-4b5e-dded-08d81ac5b5ec x-ms-traffictypediagnostic: BN8NAM12HT113: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OS20SoHND/tbn6R9QGm0yaZN3IdJminS6SEvYO25EjX2bKc97CLeSuKAlZfVDp728euT9z5WWXwmwI4miTZPFnv7TvOOrACj++/Ju6ZnLwP9rw75JpGJ8xeK/GmEoRDhiJXIuSMpUvBNwyu0X80RJb1ecB1GdC6ZV6NZXvIMKqLjfErhmhGvyBpFwwMtLrMwHDZsyuUlmXD+c/qQNMMNzsqAx9PjVqZAxUroquv98M+ILOeWH2yp+/IxjD6NrQV2 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR07MB6618.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: Bf9I4ETJMZtTnv/nDTBJAwaMjQBmQdHexVS/t0/OXPh2Gca6xkUDbbASgVDYrOJqhluOoBIOBFsF97TajGtyfuO4orSBuirrgKufD7gTgURV7s80gCuVCQWZALAjVmkb9T1l7QrpKpF1mXxt4lIa21BPZ7HjohU9qdde44to68U2swwHClhDV9cUzKb6fK5w3AxlAtCzNxX0hZ3DakkoTQ== 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: BN8NAM12FT061.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 1155bdb3-bdd9-4b5e-dded-08d81ac5b5ec X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2020 18:12:53.4964 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM12HT113 Subject: Re: [PHP-DEV] [RFC] throwable_string_param_max_len: Configurable string length in getTraceAsString() From: tysonandre775@hotmail.com (tyson andre) > >=0A= > > I've created a new RFC https://wiki.php.net/rfc/throwable_string_param_= max_len=0A= > =0A= > How come you're proposing an ini setting instead of adding a parameter=0A= > to getTraceAsString() that specifies the length for params?=0A= =0A= I don't expect many people to use a parameter for getTraceAsString(),=0A= and that alternative doesn't help with implicit `__toString()` or the defau= lt output for fatal throwables.=0A= =0A= The application developer and end user may have different ideas of what to = use as a length.=0A= If an application would manually use `getTraceAsString(Config::getMaxString= LengthForEnvironment())`,=0A= it'd be much shorter as an ini setting.=0A= =0A= > Also, I didn't understand why there was a problem with formatting=0A= > traces in userland. I saw a link to some code, but no clear=0A= > description of what the problem was.=0A= =0A= If there's an uncaught exception and no exception handler,=0A= you'll get it truncated to 15 bytes.=0A= Setting up a more complicated solution to format traces of uncaught traces = in userland is probably not worth the effort for short php scripts,=0A= and many people would call getTraceAsString() over getTrace() for the conve= nience (especially in rarely used code paths).=0A= =0A= If you're an end user of an application or composer library,=0A= patching the code to format traces in userland is inconvenient if the appli= cation developers are using stringified exceptions or getTraceAsString().= =0A= =0A= - Tyson=