Laravel parse error: syntax error, unexpected T

I developed a laravel application back in August this year, and it was working fine then. I am trying to run that application now, and it returns this error:

parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '{' or '$' in D:bkonmeartisan line 31

And line 31 is like this:

$kernel = $app->make(IlluminateContractsConsoleKernel::class);

My PHP version is 5.6.14 and I am using XAMPP on windows platform. I have some idea of it happening because of some version conflict between laravel and PHP , but i don't know how to resolve that issue, any help?


Even if you have PHP/5.6.14 installed, your app is definitively not using it. You could not use class as identifier until PHP/5.5 (demo).

The feature is called Class name resolution via ::class and it's described in the Migrating from PHP 5.4.x to PHP 5.5.x chapter of the PHP manual.

链接地址: http://www.djcxy.com/p/69516.html

上一篇: 在服务器上载laravel 5.2

下一篇: Laravel解析错误:语法错误,意外的T