pub fn set_property(&mut self, name: &str, value: impl IntoZval) -> Result<()> {
        let mut name = ZendStr::new(name, false);
        let mut value = value.into_zval(false)?;

        unsafe {
            self.handlers()?.write_property.ok_or(Error::InvalidScope)?(
                self,
                &mut *name,
                &mut value,
                std::ptr::null_mut(),
            )
            .as_ref()
        }
        .ok_or(Error::InvalidScope)?;
        Ok(())
    }
Attempts to set a property on the object.

# Parameters

* `name` - The name of the property.
* `value` - The value to set the property to.

# Errors

* `Error::InvalidScope` - If the object handlers or the properties
cannot be retrieved.
src/types/object.rs