Consider the following code:
class MyClass
{
public static $test = 'foo';
public function example()
{
return Self::$test;
}
}
// What I'm trying to do
MyClass->$test = 'bar';
$test = new MyClass();
echo $test->example(); // Should return `bar` instead of `foo`.
Is this or anything remotely close to this possible in PHP?