I installed Laravel 5.8 on local server it works fine, but on remote server it reports the error
Parse error: syntax error, unexpected ':', expecting '{' in /***/vendor/beberlei/assert/lib/Assert/functions.php on line 37
This is the line producing the error
function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return Assert::that($value, $defaultMessage, $defaultPropertyPath);
}
I think the PHP version can't understand the return type or Scalar type string. The PHP version of the server is 7.3.13
and return type and scalar type sting are valid statement in this version but it still reports the error. Do any of you guys know why does this happen?
Thanks in advance
Your app works when accessed via http://mheidari.me/tour.mheidari.me/public/.
Your app doesn't work when accessed via http://tour.mheidari.me/public/.
This implies your virtualhosts have different PHP versions assigned to them, and the error you're receiving would only be present in PHP versions earlier than PHP 7.