Re: [PHP] classes in php5

2004-09-29 Thread Daniel Watrous
ber 28, 2004 8:30 PM Subject: Re: [PHP] classes in php5 > class Foo > { } > $className = "Foo"; > $fooInstance = new $className; > ?> > Works fine for me. It still works if you add methods or properties to > Foo as well, I'm not sure why it wouldn't work for y

Re: [PHP] classes in php5

2004-09-28 Thread Matthew Fonda
Works fine for me. It still works if you add methods or properties to Foo as well, I'm not sure why it wouldn't work for you, possibly you have another error along the lines somewhere. I am on PHP 5.0.1 BTW On Tue, 2004-09-28 at 19:42, Curt Zirzow wrote: > * Thus wrote Daniel Watrous: > > Hello

Re: [PHP] classes in php5

2004-09-28 Thread Curt Zirzow
* Thus wrote Daniel Watrous: > Hello all, > > I have a class Foo. In PHP4 I could create an instance of Foo in the following > manner: > $className = "Foo"; > $fooInstance = new $className; > > This would yield the same result as: > $fooInstance = new Foo; Can you provide the definition of you

Re: [PHP] classes in php5

2004-09-28 Thread Curt Zirzow
* Thus wrote Maciek Ruckgaber Bielecki: > you are just missing the (); it wont work either in php4 or php5 that > way. > > > $className = "Foo"; > $fooInstance = new $className(); $a = new Foo; Is perfectly valid. Curt -- The above comments may offend you. flame at will. -- PHP General

Re: [PHP] classes in php5

2004-09-28 Thread Maciek Ruckgaber Bielecki
you are just missing the (); it wont work either in php4 or php5 that way. $className = "Foo"; $fooInstance = new $className(); Cheers On Tue, Sep 28, 2004 at 01:46:27PM -0600, Daniel Watrous wrote: > Hello all, > > I have a class Foo. In PHP4 I could create an instance of Foo in the follow

Re: [PHP] classes in php5

2004-09-28 Thread Andrew Kreps
On Tue, 28 Sep 2004 13:46:27 -0600, Daniel Watrous <[EMAIL PROTECTED]> wrote: > In my efforts to port this over to PHP5 I am having trouble. Not only do I not get > back an > instance of my Foo class, but the script execution stops entirely without so much as > a > warning. My first suggesti

[PHP] classes in php5

2004-09-28 Thread Daniel Watrous
Hello all, I have a class Foo. In PHP4 I could create an instance of Foo in the following manner: $className = "Foo"; $fooInstance = new $className; This would yield the same result as: $fooInstance = new Foo; In my efforts to port this over to PHP5 I am having trouble. Not only do I not get