guzzle / promises

Promises/A+ library for PHP with synchronous support
MIT License
7.61k stars 116 forks source link

issue with php 7.3+ #100

Closed preciouscoder closed 5 years ago

preciouscoder commented 5 years ago

Get error in php 7.3.1

PHP Parse error: syntax error, unexpected '[', expecting ')' in guzzlehttp/promises/src/functions.php on line 45

pjeby commented 5 years ago

I think you have mistaken PHP 5.3.1 for PHP 7.3.1. See this eval, which shows the error you are describing for PHP 5.3.0-5.3.29, but not for any version from 5.4 up. You are probably trying to run with the wrong PHP interpreter.

Tobion commented 5 years ago

As explained by @pjeby, you are using an outdated php version that is not supported anymore. See composer requirements.