Dynamic static method call in PHP?

Use the call_user_func function:

http://php.net/manual/en/function.call-user-func.php

Example:

call_user_func('myClassName_' . $language . '::myFunctionName');

Leave a Comment