I'm working on a PHP project, and from time to time between things I read online and things I see in forums, etc. I keep reading that you shouldn't use php globals. Making sure that I don't get that mixed up with PHP register_globals, because I'm not, I have been researching, but I haven't really found why or any type of alternatives.
So, my question is simple. Should I not use the global keyword in PHP? Additionally, if I shouldn't (or should), are there any alternatives? Reason being is, I have noticed that I need to access a variable defined in another file and I need to reference or call this variable in a function, lots of functions, and I'm kind of getting tired or using the global $var_name; code so much.
Any ideas (or am I just plain wrong)?