zendframework / zend-eventmanager

Implement event systems, signal slots, intercepting filters, and observers.
BSD 3-Clause "New" or "Revised" License
1.64k stars 62 forks source link

Parse error: syntax error, unexpected '.' in /var/www/html/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/SharedEventManager.php on line 209 #57

Closed princeuk closed 7 years ago

princeuk commented 7 years ago

Hi, I am getting below issue.

" Parse error: syntax error, unexpected '.' in /var/www/html/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/SharedEventManager.php on line 209"

When I have opened the code then found below line " $returnListeners[$priority] = array_merge(...$listOfListeners);"

Please suggest why you are using three times dots "...". is this issue from zend?

Regards, Urdesh

weierophinney commented 7 years ago

That notation is a splat, which is available since PHP 5.6, which is a requirement of this component. The error you're receiving is one you'll get in prior PHP versions, which do not support the operator.