Re: [RFC] Alternative typehinting syntax for accessors
| From: | Levi Morrison | Date: | Fri, 04 Jan 2013 23:34:28 +0000 |
| Subject: | Re: [RFC] Alternative typehinting syntax for accessors | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64535@lists.php.net to get a copy of this message | ||
>We should also consider how an author would allow type-hinted properties to accept NULL as a new
>value, in both proposals.
public $foo {
get;
set(Foo $value = NULL) { $this->foo = $value; }
}
Would work for traditional type-hints.