>>> I guess I am going to have to write stupid code such as: >>> >>> switch ($param1) { >>> case 'parser1': >>> return parser1::method(); >>> case 'parser2': >>> return parser2::method(); >>> } >> >> call_user_func(array($param1, 'method')); > > No. Undefined variable this in $param1. Get it ? > No. The code you displayed (in the switch block) is 100% identical to the code Derick offered (except for the fact that Derick's example will handle any class name while yours is limited).
$classname::method() === call_user_func(array($classname,'method')); Get it? -Pollita P.S. - This thread has gone on long enough, either TRY IT, or take it to [EMAIL PROTECTED] where it belongs so that they can tell you the same thing. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php