Re: PHP7 and types
| From: | S.A.N | Date: | Tue, 14 Jul 2015 10:16:03 +0000 |
| Subject: | Re: PHP7 and types | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87166@lists.php.net to get a copy of this message | ||
Yes, I think the compiler could compile the expression
class Bar
{
public Foo $foo; // That is shorthand getter/setter...
}
to
class Bar
{
get foo():Foo {return $this->_foo};
set foo(Foo $obj) {$this->_foo = $obj};
}