John W. Holmes wrote: > From: "Vivian Steller" <[EMAIL PROTECTED]> > >> Vivian Steller wrote: >> ... >> <pre> >> <?php >> class MyClass { >> function __call($method, $params) { >> // $params = Array(mixed var, mixed var, ...); >> print("request for " . $method . "()\n"); >> >> // how to get objects in this string?! >> // do i have to implement "switch($type) { case > "object": ... }" here?! >> $parameterstring = "\"" . $params[0] . "\""; >> eval("OtherClass::" . $method . "(" . > $parameterstring . ");"); > > Can't you just say: > > OtherClass::$method($params); > > here? > ... > ---John Holmes...
No, sorry that doesn't work. Interpreter is trying to acces static member $method .. and this member does not exist. The error message: Fatal error: Access to undeclared static property: OtherClass::$method in ... Thanks for your time. vivi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php