Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ColBatGuano's avatar

Tinker not using php 7

When I run tinker it uses php 5 (not 7) so dies on all my php 7 code. Is there anyway to upgrade it to work with the latest version of php?

thanks,

php artisan tinker Psy Shell v0.7.2 (PHP 5.5.36 — cli) by Justin Hileman

0 likes
2 replies
Snapey's avatar
Snapey
Best Answer
Level 122

it uses the php version available to your command line. It's not tinker's problem.

try php -v from the command line.

ColBatGuano's avatar

Yep, just discovered that! I had my env path set to the actual php file rather than the directory that contained it.

thanks,

Please or to participate in this conversation.