This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Whats the difference between $var and $::var ?

Old posts that have not been replied to for several years.
Locked
User avatar
Aron
Halfop
Posts: 86
Joined: Sat Mar 15, 2003 8:35 am

Whats the difference between $var and $::var ?

Post by Aron »

I just noticed some scripts use $::variable... Whats the difference between the too?

Thanks
The best way to start learning is to start helping.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

$var inside a proc (wittout calling it globaly using "global var") is seen as an local variable. The $::var is equal with "global var" and used in the proc as "$var". Hope you've understood somehting from this.. :) Do a forum search and you'll find a better explination because this question had his answer before.
Once the game is over, the king and the pawn go back in the same box.
User avatar
Aron
Halfop
Posts: 86
Joined: Sat Mar 15, 2003 8:35 am

Post by Aron »

alright, thanks! :)
The best way to start learning is to start helping.
Locked