class MyClass { public $name; public $age; public function unsetAttributes($attribute) { unset($this->$attribute); } } $myObj = new MyClass; $myObj->name = "John"; $myObj->age = 30; $myObj->unsetAttributes("name"); echo $myObj->name; // output: Notice: Undefined property: MyClass::$name in [filename] on line ... $myObj->unsetAttributes("age"); echo $myObj->age; // output: Notice: Undefined property: MyClass::$age in [filename] on line ...In this example, we create a class called `MyClass` with two attributes `name` and `age`. We then create an instance of the `MyClass` class and set the `name` and `age` attributes with values. Afterwards, we call the `unsetAttributes` function passing the first parameter as the attribute we want to remove from the object. The `unsetAttributes` function then removes the specified attribute from the object. Finally, we try to access the removed attribute and it shows undefined property error. The `unsetAttributes` function is not a built-in method in PHP, but rather a custom method that is created within the `MyClass` class. As such, it is package library independent.