fork(2) download
  1. <?php
  2.  
  3. //inseguro
  4. $input = 'alert("ola")';
  5. echo $input;
  6.  
  7. //seguro
  8. $input_filter = filter_var($input, FILTER_SANITIZE_STRING);
  9. echo "<br>". $input_filter;
Success #stdin #stdout 0.02s 24400KB
stdin
Standard input is empty
stdout
alert("ola")<br>alert(&#34;ola&#34;)