note 14856 added to language.oop.php

From: Date: Fri, 17 Aug 2001 14:49:04 +0000
Subject: note 14856 added to language.oop.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16845@lists.php.net to get a copy of this message
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 ___________________________________ http://www.php.net/manual/en/language.oop.php

« previous php.notes (#16845) next »