title: Why Undefined variable when its defined?
body: <p>I want to "call me!" to display once in the run function .Its displaying $loaded as  Undefined variable when I have defined to Boolean false.</p>
  
  <p>
  
  <pre><code>    $loaded=FALSE;
  
      function run(){
  
          echo "call me!";
  
          if($loaded) return;
          $loaded=TRUE;
      }
  
      for($i=1;$i&lt;10;$i++){
  
          run();
          echo "engine start";
  
      }
  </code></pre>
  
  <blockquote>
    <p>NOTICE Undefined variable: loaded </p>
  </blockquote>