ef99ac3445
Extend PHP to allow constructor paramters to be promoted to fields. Reduce plumbing of class declaration and helps productivity.
9 linhas
117 B
PHP
9 linhas
117 B
PHP
<?hh
|
|
|
|
class A<T> {
|
|
function __construct(public Vector<T> $f) {}
|
|
}
|
|
|
|
$a = new A<int>(Vector{1, 2, 3});
|
|
var_dump($a);
|