Re: [VOTE] Dump results of expressions in `php -a`
| From: | Peter Bowyer | Date: | Mon, 08 Feb 2021 09:37:29 +0000 |
| Subject: | Re: [VOTE] Dump results of expressions in `php -a` | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-113106@lists.php.net to get a copy of this message | ||
On Mon, 1 Feb 2021 at 15:40, Bob Weinand <bobwei9@hotmail.com> wrote:
> My main concern in this iteration of the RFC is: what happens with
> big/deeply nested objects?
> They tend to spew tons of lines if var_dump()'ed. Do we have reasonable
> depth/output limitations in default dumping mode?
>
Good catch Bob, I'd completely overlooked this was missing in the RFC.
I like how IPython's REPL has configuration options for this. When I start
it I can pass in arguments to truncate the output a lot or not at all. If I
always want these settings, I add them to a config file.
I hoped existing REPLs (in different languages) would have consensus about
when and where to truncate output, and representations to use; but when I
played with a few over the weekend, there wasn't. Some assume you want
everything output; others (for data structures) the first N items, and
others the first N/2 and the last N/2. Objects often show very little
that's useful.
Do you know of any research or writeups as to what works best - or even
saved output of how various REPLs show their output?
Peter