0

I'm having issues why this issue arose out of nowhere, the script I use hasn't been updated, nor the php server configuration has changed but I'm getting this erorr today

I upgraded my server to Php ver 5.6 from the standard 5.4 and this has fixed the issue, why did the ver stop processing this class all of a sudden?

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in

This is making use of kernel and this line is the app being run

I understand what a parse error and syntax error after reading, but the real question is why has this only become an issue now? The line used has no unexpected class from what I know and this server has been running 5.4 without issue up until today

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

As you can see it's making use of kernel correctly, only an upgrade to php5.6 has fixed the issue which makes no sense to me, did something become redundant all of a sudden that has altered the way 5.4 handles my request?

7
  • 1
    Sounds like code dependent on 5.5 features. Perhaps ClassName::class? Commented Jun 13, 2017 at 22:04
  • @ficuscr The code has been running on 5.4 for over a year now, yes it's kernel::class or does <5.4 not handle ClassName::class? Commented Jun 13, 2017 at 22:10
  • @Fred -ii- please check my edit Commented Jun 13, 2017 at 22:11
  • See the duplicate; the Unexpected T_CLASS is listed in it and it does have to do with the versions of php with a second duplicate added. Commented Jun 13, 2017 at 22:14
  • 1
    Okay, found my answer thanks to @ficuscr stackoverflow.com/questions/22835370/… 5.4 handles it with get_class rather than Name::Class Commented Jun 13, 2017 at 22:15

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.