title: htmlentites not working for emoji
body: <p>I am trying to show a characters html entity</p>
  
  <pre><code>echo htmlentities(htmlentities("&amp;"));
  //outputs &amp;amp;
  echo htmlentities(htmlentities("&lt;"));
  //outputs &amp;lt;
  </code></pre>
  
  <p>but it does not seem to work with emoji</p>
  
  <pre><code>echo htmlentities(htmlentities(""));
  //outputs 
  </code></pre>
  
  <p>How can I get it to output <code>&amp;#128526;</code>?
  <hr>
  Edit:</p>
  
  <p>I am trying to display a string input by the user with all of the html entities encoded.<br>
  <code>echo htmlentities(htmlentities($input))</code></p>
  
  <p>Example:
  <code>"this &amp; that " -&gt; "this &amp;amp; that &amp;#128526;"</code></p>