- stripslashes: documentation ( source)
- htmlspecialchars: documentation ( source)
- trim: documentation ( source)
<?php
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
echo test_input("hello");