I am
doing the
following:
class
JConfig {
public $var =
get_cfg_var('mySetting');
}
?>
If
I do that I received a compile error that says:
syntax
error, unexpected '(', expecting ',' or
';'
If I do
echo get_cfg_var('mySetting')
outside the class it works just
fine.
If I assign get_cfg_var('mySetting')
to a
local variable it works just fine.
Anyone has
any idea why I can't assign it to a instance variable?
No comments:
Post a Comment