cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) ?

SOLVED

How to fix Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) ?

Magento Version : 2.3.0

 

While i am run static deploy command it throw following error on CLI

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in vendor/magento/framework/Filesystem/Directory/Write.php on line 35

 

Please suggest me, how can i fix it ?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to fix Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) ?

Thanks Ankita,

 

I have fixed issue like run php71 instead of php in cli command and it's works fine now.

Thanks for the reply

View solution in original post

3 REPLIES 3

Re: How to fix Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) ?

Hi @yagnik_solanki 

Hope you are doing great!

 

This problem related to your environment.

 

Please check PHP version used by your web server.

 

Magento 2.3 is not supporting php version 7.0

it works with php 7.1 OR php 7.2. It fully supports php 7.2.

Please check your php version and upgrade it to php 7.2(recommended).

 

If my answer is useful, Please give Kudos and Accept it as Solution.

 

Thanks

Cheers Coding Smiley Happy !

 

Magento Developer
Ankita Biswas

Re: How to fix Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) ?

Thanks Ankita,

 

I have fixed issue like run php71 instead of php in cli command and it's works fine now.

Thanks for the reply

View solution in original post

Re: How to fix Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) ?

thanks a lot....