Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105618 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 71492 invoked from network); 7 May 2019 15:28:17 -0000 Received: from unknown (HELO mail1.25mail.st) (206.123.115.54) by pb1.pair.com with SMTP; 7 May 2019 15:28:17 -0000 Received: from [10.0.1.86] (unknown [49.48.243.197]) by mail1.25mail.st (Postfix) with ESMTPSA id D742160445; Tue, 7 May 2019 12:31:57 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) In-Reply-To: Date: Tue, 7 May 2019 19:31:53 +0700 Cc: Steven Wade , Nicolas Grekas , Marco Pivetta , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <76C69198-A778-4B60-8EBF-8BDEC7D2DBC1@koalephant.com> References: To: Nikita Popov X-Mailer: Apple Mail (2.3445.104.8) Subject: Re: [PHP-DEV] Proposal for a RFC From: php-lists@koalephant.com (Stephen Reay) > On 7 May 2019, at 19:22, Nikita Popov wrote: >=20 > On Tue, May 7, 2019 at 2:20 PM Steven Wade = wrote: >=20 >>> I want to weight in with what Marco expressed. I have the very same >> concerns and they are major ones for many use cases. Mine is = VarDumper. >>>=20 >>> Please don't do this the way it is described. >>=20 >>=20 >> Is there a way that you'd suggest? First of all, TIL some cool things >> about "(array) $foo" and how VarDumper uses that, so thank you! = Secondly, I >> believe the casting syntax is the best user experience and would be a = good >> addition to the language, so is there any other way at all to = maintain >> something like VarDumper's functionality without using the casting = syntax? >> I'd like to find a way to not distrupt too much of what's out there, = while >> also adding value to the end user. >>=20 >=20 > We can add a separate function to provide this functionality. We = should do > that anyway because it's both clearer and because (array) already = requires > some special handling for ArrayObject that could be avoided. >=20 > Nikita >=20 > On Tue, May 7, 2019 at 2:20 PM Steven Wade = wrote: >=20 >>> I want to weight in with what Marco expressed. I have the very same >> concerns and they are major ones for many use cases. Mine is = VarDumper. >>>=20 >>> Please don't do this the way it is described. >>=20 >>=20 >> Is there a way that you'd suggest? First of all, TIL some cool things >> about "(array) $foo" and how VarDumper uses that, so thank you! = Secondly, I >> believe the casting syntax is the best user experience and would be a = good >> addition to the language, so is there any other way at all to = maintain >> something like VarDumper's functionality without using the casting = syntax? >> I'd like to find a way to not distrupt too much of what's out there, = while >> also adding value to the end user. >>=20 >> -- >> Steven Wade >> stevenwadejr@gmail.com >>=20 >>=20 >>=20 >>=20 >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>=20 >>=20 Maybe I=E2=80=99m missing the point (I=E2=80=99ve never used it) of = VarDumper, but isn=E2=80=99t this type of thing exactly why the = `__debugInfo` magic method exists?=