title: How to execute in PHP interactive mode
body: <p>I am new to PHP, and I just wanted to run PHP in a command prompt (interactive mode).</p>
  
  <p>So I typed this code:</p>
  
  <pre><code>`php -v`
  `&lt;?php`
  `echo 7;`
  `?&gt;`
  </code></pre>
  
  <p>But I do not know how to execute it, because when I press <kbd>Enter</kbd> cmd expects me to continue writing the code. I searched on php.net and some other forums, but I didn't find anything. So is there a function key or something to display the result?</p>