Michael Wallner wrote (on 10/09/2014):
.oO(ext/filter) ?
Maybe I'm just missing some better documentation, but my main problems
with ext/filter are:
1) Many users don't know it exists, or how to use it.
2) It's pretty verbose and complex for such a simple task as "is this
thing a valid integer?"
Basically, it's a swiss army knife, but people are looking for a pair of
scissors.
There's a lot of code out there doing things like this:
if ( is_numeric($_GET['user_id']) ) {
display_user($_GET['user_id']);
}
This is definitely the wrong function to use (what kind of a user ID is
'-1.5e-50'?) but it *looks* like the right function, and it has a really
simple name, so people don't bother looking for anything more complicated...
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php