title: PHP XOR strings
body: <p>I saw this code from <a href="https://codegolf.stackexchange.com/a/53633/22867">an answer on PPCG</a>:</p>
  
  <pre><code>echo BeeABBeeoBodBaBdOdPQBBgDQgDdp^"\n\n\t8b\n\n\t\nb&amp;\nb b  \n%%nb%%%\n%\nQ";
  </code></pre>
  
  <p>I know PHP casts undefined constants into strings, so the equivalent code is:</p>
  
  <pre><code>echo 'BeeABBeeoBodBaBdOdPQBBgDQgDdp' ^ "\n\n\t8b\n\n\t\nb&amp;\nb b  \n%%nb%%%\n%\nQ";
  </code></pre>
  
  <p>The output of those are:</p>
  
  <pre class="lang-none prettyprint-override"><code>Holy Hole In A Donut, Batman!
  </code></pre>
  
  <p>Can someone explain to me how the XOR of those two strings produce that line of output?</p>