Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2021-01-05 Thread Rowan Tommins
On 03/01/2021 20:45, tyson andre wrote: __debugInfo() is a slight improvement, but the human-readable representation of an object isn't always the same thing as the debug representation of the object. A human-readable representation might be `Point(x: 1, y: 2)`, where var_dump or var_export(`__

Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2021-01-04 Thread Rowan Tommins
On 03/01/2021 20:45, tyson andre wrote: I was saying that I'd planned to propose defaults if this passed. Then I guess my feedback can be summarised as: propose these default implementations first, rather than last. Start by improving the out-of-the-box experience, and then look at what hook

Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2021-01-03 Thread tyson andre
Hi Rowan Tommins, > > - The benefit is that dumping the result of expressions improves the > > default experience. > >    psysh wouldn't be installed by default when a new developer is learning > >php through the php manual, or when sshed into a remote server. > > It doesn't feel to me that you

Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2021-01-03 Thread Rowan Tommins
On 03/01/2021 16:11, tyson andre wrote: - The benefit is that dumping the result of expressions improves the default experience. psysh wouldn't be installed by default when a new developer is learning php through the php manual, or when sshed into a remote server. It doesn't feel to me th

Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2021-01-03 Thread tyson andre
> Reading through the linked earlier mail, you have quite a few additional > hooks in mind, which might need a significant amount of additional userland > code (such as a parser implementation) to usefully implement. At that point > I'm wondering what the benefit of this hybrid approach is, rela

Re: [PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2021-01-02 Thread Nikita Popov
On Sun, Dec 20, 2020 at 11:36 PM tyson andre wrote: > Hi internals, > > I've created a new RFC > https://wiki.php.net/rfc/readline_interactive_shell_result_function > adding a way to configure a callback to be called to dump the value of > single-expression statements from `php -a` > (and an ini

[PHP-DEV] [RFC] Configurable callback to dump results of expressions in `php -a`

2020-12-20 Thread tyson andre
Hi internals, I've created a new RFC https://wiki.php.net/rfc/readline_interactive_shell_result_function adding a way to configure a callback to be called to dump the value of single-expression statements from `php -a` (and an ini setting that can be disabled to prevent that callback from being