> RFC Document: https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented

public $property {
set { $this->property = ($this->property*2)+$value }
get;
}

How do I reference the property being set from within the function? The way
I have done it in the example will cause recursion? How can I assign to
"self"?

How do I set the default value of $property when the object is created?
Surely I don't have to reverse the set accessors logic and set the inverse
in __construct?

Reply via email to