RE: [PHP] PHP globals aren't really globals

From: Date: Fri, 16 Feb 2001 20:46:39 +0000
Subject: RE: [PHP] PHP globals aren't really globals
Groups: php.general 
Request: Send a blank email to php-general+get-40220@lists.php.net to get a copy of this message
Addressed to: Maxim Maletsky <maxim.maletsky@japaninc.net> php-general@lists.php.net Christian Dechery [mailto:lemming@vento.com.br] ** Reply to note from Maxim Maletsky <maxim.maletsky@japaninc.net> Fri, 16 Feb 2001 12:18:27 +0900 > > I never used 50 of them, but I think there's such a thing as 'register > globals' wchich makes all if the globals become available inside your > funcs...... no idea how to use it ... I feel like I've seen it in = > someone > else's code ... > > correct me if I am wrong ... Consider your self corrected... :) register_globals is about placing GET/PUT/COOKIE/ENVIRONMENT variables into the global scope. It has nothing to do with functions. Rasmus explained why you need to declare variables as global in EVERY function that uses them here: http://marc.theaimsgroup.com/?l=php-general&m=97984136422910&w=2 and here: http://marc.theaimsgroup.com/?l=php-general&m=97717866712033&w=2 You may as well get used to it, it isn't going to change any time soon... Rick Widmer Internet Marketing Specialists http://www.developersdesk.com

« previous php.general (#40220) next »