Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The PHPDoc attribute @property-read is used to declare a property that can be read from outside the class, but cannot be set from outside the class. This means that the property is a read-only property.

On the other hand, @property-write is used to declare a property that can be set from outside the class, but cannot be read from outside the class. This means that the property is a write-only property.

In both cases, the property can be accessed from within the class itself. These attributes are used for documentation purposes only and do not actually change the functionality of the code.