Is it possible to extend the PHP echo so that I can run some extra processing code on every string being displayed? I need a way to sanitize all outputs and don’t want to have to call strip_tags on every display manually.
Is it possible to extend the PHP echo so that I can run some
Share
You cannot change the behaviour of
echobut you could make use php’s output buffering functions (see the callbacks). However, this seems like overkill. As casablance suggested: create a function.