fork(2) download
  1. <?php
  2.  
  3. echo htmlspecialchars('<foo><bar>Olá Mundo!</bar></foo>'), "\n";
  4.  
  5. echo htmlentities('<foo><bar>Olá Mundo!</bar></foo>'), "\n";
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
&lt;foo&gt;&lt;bar&gt;Olá Mundo!&lt;/bar&gt;&lt;/foo&gt;
&lt;foo&gt;&lt;bar&gt;Ol&aacute; Mundo!&lt;/bar&gt;&lt;/foo&gt;