title: PHP function scope calling a function within a function
body: <p>I couldn't find anything regarding my issue while searching. Maybe I wasn't wording my search properly. Anyway, I the am trying to call a function from another file from inside another function, but it isn't working. It appears to be a scope issue. I have the following:</p>
  
  <p>File1.php:</p>
  
  <pre><code>&lt;?
  function myCoolFunction()
  {
      // Some really cool stuff in here
  }
  </code></pre>
  
  <p>Then in File2.php:</p>
  
  <pre><code>&lt;?
  require('File1.php');
  
  // A bunch of stuff
  
  function anotherCoolFunction()
  {
      // Do some stuff
  
      myCoolFunction();
  }
  </code></pre>
  
  <p>myCoolFunction does not exist inside of anotherCoolFunction. I can call it in File2.php but not within another function. So my question is, how can this be achieved? Is there such thing as a super global function in php?</p>
  
  <p>Thanks for any help!</p>