NYCPHP Meetup

NYPHP.org

[nycphp-talk] multiple object instantiations in a single script

Matthew Terenzio webmaster at localnotion.com
Fri Oct 8 21:10:15 EDT 2004


What a weird subject line. Is it an OOP or procedural question?

What I mean is. . .

Well, suppose you have a User class and  a register() function in the 
class.

Then on a given script/page you are looping through some values and you 
want to create a new User and register it every time through the loop.
Of course it doesn't work because you can't do something like:

$name = new User;

more than once.

1) Do most people use dynamically named variables?

2)I had a couple beers so I can't think of the other solutions I had 
earlier today.

This is probably just a result of bad program design, but I'm having 
trouble wrapping my mind around it.




More information about the talk mailing list