> On May 12, 2021, at 3:12 AM, Nikita Popov <nikita....@gmail.com> wrote: > > Hi internals, > > If the readline extension is enabled, PHP provides an interactive shell > under -a. If it is not enabled, it falls back to an "interactive mode" > (yes, the difference between "interactive shell" and "interactive mode" is > important here). The interactive mode is simply an stdin input, which needs > to be terminated using Ctrl+D. You can only run one script that way. > > I think the current behavior is quite confusing, because it's really not > obvious that you ended up in this fallback mode (you need to know the > difference between "shell" and "mode" in the output) and most people > wouldn't know what to do with it. The latest instance of this is > https://bugs.php.net/bug.php?id=81033. > > I think we would be better off disabling -a completely if readline is not > available, and exit with a helpful error message. I've opened > https://github.com/php/php-src/pull/6976 to that effect. Does that sound > reasonable? > > Regards, > Nikita
This would have been helpful several years ago when I started compiling PHP myself and was confused why `php -a` broke. An error message would have saved me some time. So yes, please, merge it. Aaron Piotrowski -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php