When did PHP have this below?
use Namespace\{Foo, Bar}
I came across this pattern from the php pleague:
namespace Acme;
class Foo
{
/**
* @type Acme\Bar
*/
public $bar;
/**
* Construct.
*
* @param \Acme\Bar $bar
*/
public function __construct(Bar $bar)
{
$this->bar = $bar;
}
}
class Bar
{
// ...
}
And then:
<?php
use Acme\{Foo, Bar};
Is it valid? If it is, where can study this further?