title: Arrays with NULL keys
body: <p>PHP trivia here.</p>
  
  <p>If we declare an array like this:</p>
  
  <pre><code>&lt;?php $arr = [ 'foo' =&gt; 'bar', NULL =&gt; 'hello' ]; ?&gt;
  </code></pre>
  
  <p>We can access it like this</p>
  
  <pre><code>print $arr[NULL];
  </code></pre>
  
  <p>This will print <code>hello</code>. Why is this useful, relevant or necessary? Is it a PHP bug or a feature?</p>
  
  <p>My only idea was that you could declare array with the NULL key being equal to an error message to explain to anyone who uses a NULL key that their key is null:</p>
  
  <pre><code>$arr[NULL] = 'Warning you have used a null key, did you mean to?';
  </code></pre>
  
  <p>Has anyone found this useful? Seems to be something to cause more harm than good.</p>