title: what are the differences between PHP base64_encode and *nix base64
body: <p>PHP's <code>base64_encode</code> is returning a different string to the linux <code>base64</code> command.
  Why is this?</p>
  
  <p>PHP:</p>
  
  <pre><code>$ php
  &lt;?php
  echo base64_encode('test');
  ?&gt;
  dGVzdA==
  </code></pre>
  
  <p>Linux base64:</p>
  
  <pre><code>$ echo 'test' | base64
  dGVzdAo=
  </code></pre>