[UPHPU] Class and Object Storage
Justin Giboney
giboney at giboneydesigns.com
Sun Feb 17 21:00:10 MST 2008
This is my test page here.
http://www.expresslanevideo.com/docs/guidtest2.php
*Ignore the specific class and its functions (unless you want to know
more about it), it is just used as an example.
This page, runs the GUID class function called getinstance. Since the
GUID class is set up as a singleton class, it should only be created
once, or every time it is unused for a period of time and deleted from
memory.
In the __construct function of the class, I have put an echo that says
creating so that i know every time a new object is being created.
The object is being created every time the page is refreshed or hit. I
don't want this to happen. I want to only have one object on the system
at a time, that is shared by all users.
I ran a test and found out that JSP/Tomcat works the way that I want,
but since I like PHP, I want to be able to do this in PHP. How can this
be accomplish?
Thank you,
Justin Giboney
More information about the UPHPU
mailing list