|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76425 Import Grouping from Multiple Namespaces
Submitted: 2018-06-07 15:34 UTC Modified: 2018-06-07 15:42 UTC
Avg. Score:3.9 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:3 (60.0%)
From: jwillfiji at gmail dot com Assigned:
Status: Open Package: *Programming Data Structures
PHP Version: 7.2.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jwillfiji at gmail dot com
New email:
PHP Version: OS:


 [2018-06-07 15:34 UTC] jwillfiji at gmail dot com
As of PHP 7.0, grouping items when important from namespaces became allowed, however this seems to be only when everything is from one namespace, and precludes allowing the shortened format if pulling multiple items from multiple namespaces. It is unclear if this was intended behavior, or if this is a bug. If this was intended, please change to request for this proposed functionality.

Test script:
namespace Foo;
class f1{}
class f2{}

namespace Bar;
class b1{}
class b2{}

namespace main;
use Foo\{f1,f2}, Bar\{b1,b2};

>> PHP Parse error: Syntax error, unexpected ',', expecting ';' on line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-07 15:40 UTC] jwillfiji at gmail dot com
-PHP Version: 7.0.30 +PHP Version: 7.2.5
 [2018-06-07 15:40 UTC] jwillfiji at gmail dot com
For what it's worth, I am running PHP 7.2.5-1 on Ubuntu 16.04.1. My guess is this effects all version from 7.0 onward.
 [2018-06-07 15:42 UTC]
-Type: Bug +Type: Feature/Change Request
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 13:01:24 2021 UTC