title: How to use class methods as callbacks
body: <p>I have a class with methods that I want to use as callbacks.<br />
  How can I pass them as arguments?</p>
  <pre class="lang-php prettyprint-override"><code>Class MyClass {
      
      public function myMethod() {
          // How should these be called?
          $this-&gt;processSomething(this-&gt;myCallback);
          $this-&gt;processSomething(self::myStaticCallback);
      }
  
      private function processSomething(callable $callback) {
          // Process something...
          $callback();
      }
  
      private function myCallback() {
          // Do something...
      }
  
      private static function myStaticCallback() {
          // Do something...
      }   
      
  }
  </code></pre>