title: my php code does not run in the html script tag
body: <p>hi I write a php file that contains two methods :</p>
  <p><strong>1)</strong></p>
  <pre><code>function restart(){ echo('restart') };
  </code></pre>
  <p><strong>2)</strong></p>
  <pre><code>function shutdown(){echo ('shutdown')};
  </code></pre>
  <p>then I include the <strong>index.php</strong> file to the <strong>foo.php</strong> and when I want to call index.php <strong>methods</strong> in an <strong>eventHandler</strong> in foo.php it doesn't work like this:</p>
  <pre><code>    &lt;?php
  include ('index.php');
  
  ?&gt;
  
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;/head&gt;
      &lt;body&gt;
          
      &lt;button id='res'&gt;restart&lt;/button&gt;
      &lt;button id='sht'&gt;shutdown&lt;/button&gt;
      &lt;script&gt;
          document.getElementById('res').addEventListener('click',function(){
              console.log('restarted');
              &lt;?php
  
             restart();
             ?&gt;
          })
      &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>output: <strong>nothing and no errors</strong></p>
  <hr />
  <p>and when I <strong>remove</strong> the php code <strong>inside the eventHandler</strong> it works! like this:</p>
  <hr />
  <pre><code>  &lt;?php
      include ('index.php');
  
  ?&gt;
  
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;/head&gt;
      &lt;body&gt;
          
      &lt;button id='res'&gt;restart&lt;/button&gt;
      &lt;button id='sht'&gt;shutdown&lt;/button&gt;
      &lt;script&gt;
          document.getElementById('res').addEventListener('click',function(){
              console.log('restarted');
             
          })
      &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <hr />
  <p>output: <strong>restarted</strong></p>
  <p><strong>WHAT IS THE PROBLEM?</strong></p>