unset()

unset() removes a variable, an array item or an property. This feature used to be available as a function call unset() or as a type cast (unset). The type-cast was removed in PHP 7.2.

It is not possible to remove a static property, but it is possible to remove a property: a defined property will be reverted to its definition, while an undefined property is removed. It may end up being uninitialized if it does not have a default value.

<?php

$a = ['b' => 1];
unset($a['b']); // unset an element
unset($a);      // unset the whole array

var_dump(isset($a)); // false

?>

Documentation

See also PHP unset Keyword and Demystifying PHP‘s Unset() Function.

Related : Variables, Index For Arrays, Garbage Collection, Local Variable