Thursday, January 29, 2004

PHP Lesson: is_int() vs. is_numeric()

This one is for Steve:

Note to anyone else who might do the dumb thing I did. When you're handling GET/POST input in PHP and wan to know if a value is numeric, don't use is_int() because it'll lie to you. What you want is is_numeric(). Of course, the is_int() documentation specifically warns you about this, but it doesn't do much good if you read right past it. I was *this* close to walking over to Rasmus or Andrei and asking for a sanity check,... [Jeremy Zawodny's blog]

2:57:13 PM    trackback []     
 
 
 


Email Subscription
Enter your email address below to subscribe to deeje.com!


powered by Bloglet

Bookmarks
Steve Cooley
Tony Gentile
BloggerJack