PHP Parse error: syntax error, unexpected ‘class‘ (T_CLASS), expecting identifier (T_STRING)

Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) in D:\phpstudy\WWW\pro\vendor\overtrue\wechat\src\Foundation\Application. php on line 86
[4] ErrorException in Application.php line 86
syntax error: unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING)


*/ class Application extends Container { /** * Service Providers. * * @var array */ protected $providers = [ ServiceProviders\FundamentalServiceProvider::class, ServiceProviders\ServerServiceProvider::class, ServiceProviders\UserServiceProvider::class, ServiceProviders\JsServiceProvider::class, ServiceProviders\OAuthServiceProvider::class, ServiceProviders\MenuServiceProvider::class, ServiceProviders\NoticeServiceProvider::class, ServiceProviders\MaterialServiceProvider::class, ServiceProviders\StaffServiceProvider::class, ServiceProviders\UrlServiceProvider::class,

Call Stack

    in Application.php line 86
    at Error::appShutdown()

Solution:

1: Adjust the php version on it.
2: It is possible that the name of the definition is repeated.

Read More: