fork download
  1. <?php
  2.  
  3. $string = '&amp;';
  4. $result = htmlentities($string, ENT_QUOTES, 'UTF-8');
  5.  
  6. var_dump($result);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
string(9) "&amp;amp;"