Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 103023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:03:29+00:00 2026-05-11T01:03:29+00:00

Why would I want to use PHP’s filter library? Why wouldn’t I? It seems

  • 0

Why would I want to use PHP’s filter library? Why wouldn’t I?

It seems to try and do a bit of clean-up (it’s awful when you have to work with regular expressions), but on the other hand function naming and parameter constants seem to be a disaster, if you ask me. It must have been included in PHP for a reason, but I just don’t seem to like it. What am I missing?

Later edit:
Regarding GaryF’s answer, I wish to explain a bit why I don’t like this function. This isn’t about using it in ‘my case’ if it fits. This is about using it wherever it fits. There’s a high chance of needing a filter that won’t fit PHP’s functions, so I’ll have to create my own filter. In that case, the application will use two completely different kinds of functions for data filtering. I consider that to be a much worse practice than just inventing a better wheel.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:03:29+00:00Added an answer on May 11, 2026 at 1:03 am

    My stance is that the concept of filtering input data is flawed on a conceptual level. See my reply to the almost similar question What’s the best method for sanitizing user input with PHP?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Executor seems like a clean abstraction. When would you want to use Thread directly
I want to use the sharer.php popup to open the share dialog, but would
Hay, I want to use PHP's GD library to open a GIF image and
I'm building a web application and eventually would want to use Yii framework. But
Could someone please explain when would I want to use delegation instead of inheritance?
I want to use XMPP to push data to my client which would translate
I want to use libharu to render my documents to PDF. I would like
I want to use a shape of some sort for now, but would like
Which version of Linux would be my best choice if I want to use
I would like to reproduce UIScrollView's flick-to-scroll behavior, but I don't want to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.