title: How to execute php block from terminal without saving to a file
body: <p>Say I have a block of code I would like to test like this:</p>
  
  <pre><code>&lt;?php 
   Print "Hello, World!";
  ?&gt;
  </code></pre>
  
  <p>How I quickly run this code from terminal without saving it to a file?</p>
  
  <p>I tried things like... </p>
  
  <pre><code>php -r "Print "Hello, World!";"
  </code></pre>
  
  <p>but just got complaints about syntax errors. There has to be a simple way of doing this. I just have yet to find any explanations.</p>