Laravel parsing error: syntax error, unexpected T_CLASS, awaiting T_STRING

This year I developed the application laravelin August, and then it worked fine. I try to run this application now and it returns this error:

Syntax error: syntax error, unexpected T_CLASS, waiting for T_STRING or T_VARIABLE or '{' or '$' in line D: \ bkonme \ artisan 31

And line 31 looks like this:

$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);

My version PHP 5.6.14, and I use the platform XAMPPon windows. I have some idea that this is due to a version conflict between laraveland PHP, but I don’t know how to solve this problem, any help?

+4
source share
1 answer

Even if you have PHP / 5.6.14 installed, your application does not use it completely. You could not use classas identifier until PHP / 5.5 ( demo ).

This function is called resolving the class name through :: class, and it is described in the Transfer from the PHP 5.4.x section to the PHP 5.5.x PHP manual.

+2
source

Source: https://habr.com/ru/post/1618108/


All Articles