coding style - PHP "use" declarations repeated or with a comma? -


i curious know, when declaring use statements php @ start of class, why "use" keyword repeated in each line though possible put coma @ end off line next declaration, following:

namespace behat\mink;  use behat\mink\driver\driverinterface,     behat\mink\selector\selectorshandler,     behat\mink\element\documentelement; 

unlike this:

namespace symfony\bundle\frameworkbundle\controller;  use symfony\component\httpfoundation\response; use symfony\component\httpfoundation\redirectresponse; use symfony\component\dependencyinjection\containeraware; use symfony\component\httpkernel\exception\notfoundhttpexception; use symfony\component\form\formtypeinterface; use symfony\component\form\form; use symfony\component\form\formbuilder; use symfony\bundle\doctrinebundle\registry; use symfony\component\httpfoundation\request; 

it ease copy/paste ? mimic import statements of java ? or don't care... :)

it's convenience allow multiple statements on same line. here's excerpt php documentation:

php additionally supports convenience shortcut place multiple use statements on same line


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -