The ZPE unset feature has been included as a YASS language keyword since ZPE 1.12.4. Prior to
this it was a predefined function which can be found here.
unset destroys any references to a variable.
It follows the standard variable hierarchy in that it will find a local
variable, then a parameter then a global variable which if not found will
result in the function returning false.
Using unset
The unset feature works like a function syntactically but it differs in it's
implementation.
$a = 10 unset($a) print($a) $b = [11, 22, 33] unset($b[2]) print($b)
Before becoming a keyword
Prior to unset becoming a language keyword, the
unset was a function. Part of the design philosophy
behind making a keyword was to make execution faster as it was a widely used
function but whilst maintaining compatibility with existing scripts.
The unset function is one of the oldest functions
in ZPE. You can read more about it here.

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days.
Comments powered by BalfComment