问题描述:

I've just realized that artisan tinker has an older PHP version than Homestead does.

Is there any way to update it without having to update Laravel itself? Otherwise it makes tinker useless to me, because it will complain about many simple things like array const, which is only available in php 5.6.

网友答案:

Tinker uses PsySH REPL which uses PHP installed on your machine. So just update PHP on your machine or use Homestead (current version has PHP 7.0.3 by default).

To check current version of PHP you can enter this code in tinker:

echo phpversion();
相关阅读:
Top