Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
That filter() function you post really has nothing to do with PHP, as in its not a built in function. You'd have to ask whoever wrote it. Although I can say GPC magic quotes was a feature that "magically" escaped things, so it looks like the developer checks if this is enabled before manually escaping a value.
jankidudel wrote:PHP has very good arsenal of funcions, but who named them ?
Example: strip_tags , stripslashes ? why 1 function is separated & second isn't ?
Many PHP's function names simply follow the underlying library's naming. That follows PHP Share Nothing philosophy which unlike other language (Java being a prime example) does not recreate everything with pleasing names. PHP just uses existing subsystems assuming that their builders knew better -- hence the "good arsenal."
jankidudel wrote:And, can someone explain me why in this function there is so many filtering, i think half of them isn't necessary.
There is a reason for every line in that function. It is sort of a primer in PHP web security for MySQL database values.