When trying to running my website online after migrating it from offline:
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home/advancew/sample.advance-web-studio.com/vendor/ramsey/uuid/src/functions.php on line 34
The same .htaccess works offline why it does not works online?
My hosting provider mentions that it is .htaccess script error
.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
That's probably a problem with your PHP version.
Check that you are using version >= 7.2.5.
If you've deploy on a shared hosting with cPanel, you can usually can easily change the PHP version from there, although you might need to do some other change on .htaccess to be sure that your web application is using the same version.
Just in case, throw a .php file with a call to phpinfo() in it and browse that file to see which PHP version shows.
I had this same problem with a server, which even verifying that it was configured to run with the latest PHP version available at that time, as it had different versions installed, for some reason the phpinfo() showed that the webserver for that particular domain was running PHP v5.x