Possible Duplicate:
Magic __get getter for static properties in PHP
Is it possible to catch a call to a static parameter like this:
class foo
{
public static $foo = 1;
//public static $bar = 2;
public function catch_bar_call()
{
print "Calling an undefined property";
}
}
print foo::$foo //1
print foo::$bar //error
instead of getting an error, i want a method to be called. i know its possible trough __get() magic method, but you'll have to instantiate your class for this, not possible on static parameter.