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 > called). > > Many REPLs (Read-Eval-Print Loops) for other programming languages that I'm > familiar with > print a (possibly truncated) representation of the result of expressions, but > PHP doesn't. > It would be useful to allow users to extend the functionality of the default > interactive php shell (php -a), > possibly with auto_prepend_file or through use of command wrappers/aliases, > or after loading the shell. > Prior to this RFC, there was no way to extend the interactive php shell in > this way. > (I've seen https://github.com/bobthecow/psysh mentioned as an alternative for > php -a while investigating this, > but that's a shell written from scratch, and doesn't have some functionality > from php -a such as tolerance of fatal errors)
A reminder that I plan to start the vote on https://wiki.php.net/rfc/readline_interactive_shell_result_function on 2021-01-03 Thanks, - Tyson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php