self::$$var = $value;
class foo { public static $bar = null; function setValue($var,$value) { self::$$var = $value; } } $test = new foo(); $test->setValue("bar","It Does Work!"); echo foo::$bar;
It Does Work!
Comment