Einzelnen Beitrag anzeigen
Alt 25.10.2002, 11:18   #5
_m3
Inventar
 
Registriert seit: 24.09.2001
Beiträge: 7.335


Standard

http://at.php.net/manual/de/migration4.variables.php
Zitat:
While handling of global variables had the focus on to be easy in PHP 3 and early versions of PHP 4, the focus has changed to be more secure. While in PHP 3 the following example worked fine, in PHP 4 it has to be unset($GLOBALS["id"]);. This is only one issue of global variable handling. You should always have used $GLOBALS, with newer versions of PHP 4 you are forced to do so in most cases. Read more on this subject in the global references section.
PHP-Code:
<?php
$id 
1;
function 
test()
{
    global 
$id;
    unset(
$id);
}
test();
echo(
$id); // This will print out 1 in PHP 4
?>
____________________________________
Weiterhin zu finden auf http://martin.leyrer.priv.at , http://twitter.com/leyrer , http://www.debattierclub.net/ , http://www.tratschen.at/ und via Instant Messaging auf Jabber: m3 <ät> cargal.org .
_m3 ist offline   Mit Zitat antworten