title: Call to function in function in class (PHP)
body: <p>Very simple setting, but I simply don't get it...</p>
  
  <p><em>functions.php</em></p>
  
  <pre><code>class functions {
      function output_functions() {
          function sendMail($to, $subject, $message){
              //...code...
          }
      }
  }
  </code></pre>
  
  <p><em>myfile.php</em></p>
  
  <pre><code>include $_SERVER['DOCUMENT_ROOT'] ."some/subfolders/functions.php";
  
  $myFunction = new functions();
  $myFunction-&gt;output_functions()-&gt;sendMail("mail@mail.com","My Subject","My Message");
  </code></pre>
  
  <p>And I'm getting the Error:</p>
  
  <blockquote>
    <p>Call to a member function sendMail() on null</p>
  </blockquote>
  
  <p>Any help will be highly appreciated!</p>