If we had it, I think it would need to be a little bit more concise;
it looks a little bit messy (sorry Marcus!).

class A {
    private var $_X;
    protected function set_X($newX) {
        $this->_X = $newX;
    }
    public property X read $_X, write set_X;
}

On 10/04/02, "Shane Caraveo" <[EMAIL PROTECTED]> wrote:
>  > What if we would use declared properties?
>  > class A {
>  >         private var $_X;
>  >
>  >         protected function set_X($newX) {
>  >                 $this->_X = $newX;
>  >         }
>  >
>  >         public property X = { read = $_X, write = set_X};
>  > }
>  > marcus
> I have to say, I wouldn't mind having this syntax in PHP.



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to