Closed sevaske closed 2 years ago
Hi @sevaske typing a property as an array is compliant with any PHP version >= 7.4.0 so you are either running an older PHP version or something else is wrong on your server. Please note that your PHP CLI version is not necessarily the same as your FPM version. Good luck debugging ;)
Hi @sevaske typing a property as an array is compliant with any PHP version >= 7.4.0 so you are either running an older PHP version or something else is wrong on your server. Please note that your PHP CLI version is not necessarily the same as your FPM version. Good luck debugging ;)
Oh, you are right. We had the same PHP version FPM and CLI. Apparently someone changed the version. I should have checked it first, I'm sorry.
I run a code from example and it works on my local server. When I run same code on the google cloud server, I see this in logs:
PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) in /var/www/html/zxc/vendor/endroid/qr-code/src/Builder/Builder.php on line 53
I have the same error with just this:
53 line:
private array $options;
PHP 7.4.27 (cli) (built: Dec 20 2021 21:27:56) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies
And same PHP version on the google cloud server.