> On 7 May 2019, at 19:22, Nikita Popov <nikita....@gmail.com> wrote: > > On Tue, May 7, 2019 at 2:20 PM Steven Wade <stevenwad...@gmail.com> wrote: > >>> 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. >>> >>> Please don't do this the way it is described. >> >> >> 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. >> > > 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. > > Nikita > > On Tue, May 7, 2019 at 2:20 PM Steven Wade <stevenwad...@gmail.com> wrote: > >>> 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. >>> >>> Please don't do this the way it is described. >> >> >> 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. >> >> -- >> Steven Wade >> stevenwad...@gmail.com >> >> >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >>
Maybe I’m missing the point (I’ve never used it) of VarDumper, but isn’t this type of thing exactly why the `__debugInfo` magic method exists? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php