Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about using singleton design pattern

Status
Not open for further replies.

Netooi

Programmer
May 15, 2002
29
0
0
US
Hello, I have a question or two about singleton design pattern in php..

First of all, does having a single static instance of a class mean that you can get a reference to that class in two separate webpages and in the second page, it still contain all the data from the first page. If so, this would help me out a lot.

Secondly, if this is possible, could someone give me some
example code for implementing the singleton design pattern
for a class in php. I have looked online, and found a few
examples but never was able to get any of them to work.

Thirdly, if the first is possible, are there any drawbacks to doing this.

Thanks for any input,
Netooi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top