Do you have a question? Post it now! No Registration Necessary. Now with pictures!
May 1, 2005, 4:21 pm
rate this thread
Sometimes I want to use certain data and functions anywhere in my code;
for example, when writing logging routines. In PHP5 I could write a
class with all static members and functions, a singleton class, or a
regular class assigned to a global variable. What would be the
advantages of each?
In Java web-apps (or in non-web applications), these classes persist
for much longer, so it's easier to see the reasons for using them. But
in PHP, it seems like you could do pretty much the same thing with all
Am I wrong?