title: Find out if a method exists in a static class
body: <p>I want to check is a function exists in a library that I am creating, which is static. I've seen function and method_exists, but haven't found a way that allows me to call them in a relative context. Here is a better example:</p>
  
  <pre><code>class myClass{
      function test1()
      {
          if(method_exists("myClass", "test1"))
          {
              echo "Hi";
          }
      }
      function test2()
      {
          if(method_exists($this, "test2"))
          {
              echo "Hi";
          }
      }
      function test3()
      {
          if(method_exists(self, "test3"))
          {
              echo "Hi";
          }
      }
  }
  // Echos Hi
  myClass::test1();
  // Trys to use 'self' as a string instead of a constant
  myClass::test3();
  // Echos Hi
  $obj = new myClass;
  $obj-&gt;test2();
  </code></pre>
  
  <p>I need to be able to make test 3 echo Hi if the function exists, without needing to take it out of static context. Given the keyword for accessing the class should be 'self', as $this is for assigned classes.</p>