I had a weird issue with Laravel’s Tinker artisan command. Every time I would load it up and type a command, it would immediately quit.
$ php artisan tinker Psy Shell v0.9.9 (PHP 7.3.8 — cli) by Justin Hileman >>> Str::plural('url', 1); $
It would just jump straight back my terminal prompt.
The fix appears to be to add a custom config that instructs PsySH – on which Tinker is built – to not use PHP’s pcntl extension for process control.
$ cat ~/.config/psysh/config.php <?php return [ 'usePcntl' => false, ];
That one did the tricky for me.
$ php artisan tinker Psy Shell v0.9.9 (PHP 7.3.8 — cli) by Justin Hileman >>> Str::plural('url', 1); => "url" >>> Str::plural('url', 2); => "urls"
Hope this saves you some headaches!