title: PHP - Add null character to string
body: <p>I'm trying to append a number of NULL characters '\0' to a string in PHP.</p>
  
  <pre><code>$s = 'hello';
  while(strlen($s) &lt; 32) $s .= '\0';
  </code></pre>
  
  <p>However, PHP adds 2 characters (\ and 0), instead of escaping the character and adding NULL. Does anyone know to add a NULL character to a string?</p>