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

From: Date: Mon, 04 Jan 2021 10:28:37 +0000
Subject: Re: [RFC] Configurable callback to dump results of expressions in `php -a`
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-112744@lists.php.net to get a copy of this message
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 hooks userland tools might want to customise that (which might involve something "smarter" than replacing the entire output routine).
Psysh is 2.4MB as a compiled phar release and larger if distributed with library/application releases (e.g. on remote servers). default extension hooks would likely be much smaller.
That was a lot of data when I used to carry floppy disks around in my school backpack. It sounds pretty reasonable for a feature-rich command-line tool in 2021.
Someone learning from the php.net manual or a tutorial with minimal dependencies wouldn't install psysh right now.
To be honest, I doubt most users ever come across php -a either, or know that they need to install ext/readline to unlock its features (I'm pretty sure that's not installed by default on Ubuntu, for instance). I'm supportive of the idea of changing that, but I don't think the RFC as currently presented particularly helps that cause. Regards, -- Rowan Tommins [IMSoP]

« previous php.internals (#112744) next »