当前位置: 动力学知识库 > 问答 > 编程问答 >

laravel - How do I update artisan tinker php version?

问题描述:

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();
分享给朋友:
您可能感兴趣的文章:
随机阅读: