Re: Dynamic class names and namespaces

From: Date: Mon, 22 Oct 2007 21:23:47 +0000
Subject: Re: Dynamic class names and namespaces
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-32915@lists.php.net to get a copy of this message
Ahh, I see, that's a bit disappointing. Any reason why it doesn't/shouldn't work ?
Yes. Test::Foo is a class name, so you can't make part of it variable and part not, just as you couldn't write: $var = "bar"; $a = new foo$var(); and expect new instance of class "foobar". You'd have to compose the full name in variable and then use it. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#32915) next »