note 14856 deleted from language.oop by vincent

From: Date: Thu, 11 Sep 2003 19:55:09 +0000
Subject: note 14856 deleted from language.oop by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56195@lists.php.net to get a copy of this message
Note Submitter: du.r@bol.com.br ---- Thanks to Robin for his solution: ____________________________________ well... maybe. Constants aren't replaced inside a string though, and class names aren't quoted so there's scope for confusion there. If you absolutely have to use a constant to carry your classname, the only way I can think of doing what you're asking is to replace the last line of your code with this: $UserInformation = eval( 'return new ' . USER_INF_CLASS . ';' ); hope this helps. -robin ___________________________________

« previous php.notes (#56195) next »