Access control within PHP5 object properties is handled somewhat differently than method visibility. When declaring a public property within the standard property table, you can use the zend_hash_add() or add_property_*() family functions just as you would ordinarily expect to.
For protected and private properties, however, a new Zend API function is required:
void zend_mangle_property_name(char **dest, int *dest_length, char *class, int class_length, char *prop, int prop_length, int persistent)
This function will allocate a new chunk or memory and construct a string according to the layout: