Closed Kidoo96 closed 1 year ago
Well - that line is perfectly ok and contains a function declaration with a return type hint. The script works with PHP 7.4, 8.0 and 8.1.
What PHP version do you use? You need at least PHP 7.4 - and even that PHP version is already "end of life" (also see https://www.php.net/supported-versions.php)
Edit: that error happens, if you try to run it with PHP 5.6 - this is not supported as that version is way outdated. I will add a version check so the script will at least tell you what is wrong.
Edit 2: ok, version checking is not possible, since PHP 5.6 refuses to load the script at all. So I'll close this for now. Just use a decent PHP version, thanks!
I removed the type hint, so you may be able to use the script even with ancient PHP versions. However it is still not recommended to use such old versions.
Yeah my bad. PHP cli version was 5.6 just updated it on 8.0. Didn't check the cli version. Thanks for the feedback.
Hi, I tried to add a print button but when running php build.php command.
I got this error
Parse error: syntax error, unexpected ':', expecting ';' or '{' in \lightbox-photoswipe\build.php on line 18