PHP 7 Group Use Declarations for Short Standard Namespaces -


so php 7 has nice group use declarations namespaces, this:

use symfony\component\console\{   helper\table,   input\arrayinput,   input\inputinterface,   output\nulloutput,   output\outputinterface,   question\question,   question\choicequestion choice,   question\confirmationquestion, }; 

but reason same syntax not work one-word namespaces (all same global namespace, manual requires), this:

use {arrayaccess, closure, countable, iteratoraggregate}; //or  use \{arrayaccess, closure, countable, iteratoraggregate}; 

both gives error (while ide not show syntax issues):

php parse error:  syntax error, unexpected '{', expecting identifier (t_string) or function (t_function) or const (t_const) or \\ (t_ns_separator) in ... 

simple standard use of multiple namespaces works intended:

use arrayaccess, closure, countable, iteratoraggregate; //no errors 

so there reason why such syntax can not applied here?


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -