Hi folks

I define a constant in a config file:

define( 'VARIABLE_CLASS', 'myclass' ) ;

Can any kind person explain why this fails with the error "Cannot
instantiate non-existent class"

>>>>>>>>>>>>>>
new VARIABLE_CLASS ;
>>>>>>>>>>>>>>

While this works:

>>>>>>>>>>>>>>
$class = VARIABLE_CLASS ;
new $class ;
>>>>>>>>>>>>>>

Must be something about constants which I don't understand...

Thanks

Geoff Caplan

Reply via email to