Re: How to call a static class and method dynamically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



class MyClass {
   function static_method() {
      echo 'I'm in static_method !';
   }
}

You can call the function statically using the double colon ( :: ) operator :

Ahem. Double colon does now works with dynamic names. If I'm not mistaken, call_user_func(array('class', 'function')) is the only way.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux