Dont’ make my mistake. It is costly.
Say you have defined a variable $var in your main script.
Now in a function you access it using:
global $var;
But you want to set it to null inside the function.
DO: $var = null;
DONT DO: unset($var);
Why? Because the 2nd way removes the variable from the name space,
and it is no longer globally available. Cost me 10 hours....
--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-Don-unse...ict237516.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=825331
Say you have defined a variable $var in your main script.
Now in a function you access it using:
global $var;
But you want to set it to null inside the function.
DO: $var = null;
DONT DO: unset($var);
Why? Because the 2nd way removes the variable from the name space,
and it is no longer globally available. Cost me 10 hours....
--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-Don-unse...ict237516.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=825331
Comment