Re: [VOTE] declare(function_and_const_lookup='global')

From: Date: Thu, 30 Jan 2020 13:58:41 +0000
Subject: Re: [VOTE] declare(function_and_const_lookup='global')
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-108332@lists.php.net to get a copy of this message
> <?php > declare(strict_qualify=1); > > namespace foo; > > use function \{array_diff, var_dump}; > use const \bar\{a, b}; [Off-topic] All coding standards I've seen forbid writing a leading backslash in "use" and in strings. Indeed, use \Ns\Klass; gives the false impression that the leading backslash be required to avoid relative resolution, but use Ns\Klass; is already absolute. And for strings, \Ns\Klass::class (or get_class(new \Ns\Klass())) is equal to 'Ns\Klass', not '\Ns\Klass'. -- Guilliam Xavier

« previous php.internals (#108332) next »