title: How to run PHP locally on MacOS
body: <p>I need a php sandbox on my local.</p>
  <p>But I have to make just one class in PHP.</p>
  <p>In NODE.JS I can do the following:</p>
  <p><strong>test.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>// my test js script
  console.log('hello world')
  </code></pre>
  <p>I can run it like this:</p>
  <pre class="lang-sh prettyprint-override"><code>~$ node test.js
  ~$ hello world
  ~$ 
  </code></pre>
  <p>I would like to do something like this:</p>
  <p><strong>test.php</strong></p>
  <pre class="lang-php prettyprint-override"><code>echo('hello world');
  </code></pre>
  <p>I would like to run it like this:</p>
  <pre class="lang-sh prettyprint-override"><code>~$ php test.php
  ~$ hello world
  ~$ 
  </code></pre>
  <p>Is there any way to do this, without installing apache and everything?
  I just like to have a php sandbox on my mac.</p>