Is it possible to have a PHP class and set up a variable inside of the class in such a way that it can be used without referring to the class first. In other words, can such a variable somehow be made a global? Or if not a global, what code could make a variable outside a class refer to the one inside the class.
Class Example:
class A {
$my_var = '';
}
Code Example:
$new_a = new A();
$my_var = 'some string';
//This should change the variable inside the class,
//without having to call $new_a->my_var = 'some string';
Is this in any way possible?
Thank you Michael
$new_a -> my_var