snipt

Ctrl+h for KB shortcuts

Text only

PHP Unset all variables

foreach (array_keys($GLOBALS) as $k) unset($$k);
unset($k);
https://snipt.net/embed/3dc502278b0f6993c73ed871cd80a420/
/raw/3dc502278b0f6993c73ed871cd80a420/
3dc502278b0f6993c73ed871cd80a420
text
Text only
3
2019-05-15T05:01:15
True
False
False
Jun 20, 2016 at 06:27 PM
/api/public/snipt/147262/
php-unset-all-variables
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>foreach (array_keys($GLOBALS) as $k) unset($$k); </span><span id="L-2"><a name="L-2"></a>unset($k); </span></pre></div> </td></tr></table>
php