Skip to main content

Unset variable

Anatomy

<unset var="var" key="(no key)"/>

Description: UNSET unsets a variable.

These three statements are semantically equivalent:

Attention:

The TYPEOF operation will subsequently return 'undefined' for this variable.

Attributes

NameTypeDescriptionDefined By
varvarVariable name unset
keystringKey unset

Examples

Unsetting variable

<unset var="var"/>

Unsetting array item implicitly

<unset var="var[key]"/>

Unsetting array item explicitly

<unset var="var" key="key"/>