Re: RFC: C-sharp style property get/set syntax for PHP
| From: | Chad Fulton | Date: | Mon, 29 Nov 2010 08:36:52 +0000 |
| Subject: | Re: RFC: C-sharp style property get/set syntax for PHP | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50684@lists.php.net to get a copy of this message | ||
On Sun, Nov 28, 2010 at 11:48 PM, Christian Kaps
<christian.kaps@mohiva.com> wrote:
...
> /**
> *
> */
> public function set name(string $name) {
> $this->name = htmlentities($name);
> $this->name = strip_tags($this->name);
> }
>
> /**
> *
> */
> public function get name($name) {
> return $this->name;
> }
>
> Greetings,
> Christian
>
For whatever it's worth, I think that this syntax fits much better
into PHP than do either of the those in the RFC.