Req #70841 [Opn->Csd]: Group use declarations doesn't work for global symbols

From: Date: Mon, 02 Nov 2015 21:12:13 +0000
Subject: Req #70841 [Opn->Csd]: Group use declarations doesn't work for global symbols
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196984@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70841&edit=1 ID: 70841 Updated by: nikic@php.net Reported by: david at grudl dot com Summary: Group use declarations doesn't work for global symbols -Status: Open +Status: Closed Type: Feature/Change Request -Package: *Compile Issues +Package: Scripting Engine problem PHP Version: 7.0.0RC6 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: You can simply use a normal use statement instead: use SplStack, SplHeap; // or use function is_array, is_int; Previous Comments: ------------------------------------------------------------------------ [2015-11-02 20:49:38] david at grudl dot com Description: ------------ Group use declarations doesn't work for globals: <?php namespace Abc; use \{SplStack, SplHeap}; // or use function \{is_array, is_int}; This generates Parse error: syntax error, unexpected '{', expecting identifier (T_STRING) in ... Group use declarations for global functions should be really useful, because some functions (is_array, strlen, ...) are inlined in PHP7. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70841&edit=1

« previous php.bugs (#196984) next »