Tag Archives | code

Elefant

The unsettling Truth about the Global Unset

In PHP, there is a pitfall when using unset on a global variable within the scope of a function or method. When referred to using the global keyword within a function, unset will not destroy the global variable within the global scope. global $banana; $banana = ‘yellow’; function monkey() { global $banana; unset( $banana ); […]

Continue Reading 0
We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share