PHP Artisan Tinker crashing from any command PHP Artisan Tinker crashing from any command laravel laravel

PHP Artisan Tinker crashing from any command


If you are using PHP 7.3 installed by homebrew on Mojave, try creating a config file at ~/.config/psysh/config.php if not already there:

<?phpreturn [  'usePcntl' => false,]; 

Source: https://github.com/bobthecow/psysh/issues/540#issuecomment-446480753


This happens on Mojave when you upgrade/install PHP 7.3 using homebrew, (It's a problem with PsySh (used by Tinker) and Homebrew's PHP 7.3.0 build.)

Simple solution is, In your php.ini set

pcre.jit=0


If you don't know which ini file is used, you can run php --ini to find it,

# /usr/local/etc/php/7.3/php.ini- ;pcre.jit=1+ pcre.jit=0