hey are nearly identical. You might want to unset
$content
in the first example as the second example only creates the local variable as the first parameter of removebadstuff
.
Keep in mind that strings in PHP are binary-safe.
Required reading: The ultimate clean/secure function