On Nov 13, 2007, at 3:14 PM, John Campbell wrote:
On Nov 13, 2007 2:56 PM, dann <[EMAIL PROTECTED]> wrote:
One small caveat I failed to mention earlier: [...snip...] ctype_digit [...snip...] returns false
if you pass it an actual integer.
Easily fixed with:
ctype_digit("$int");
With the added bonus, that another dev will come behind you, remove
the quotes, and create a bug. :)

Although, you originally said you were using this for request variables which are always strings.

By the way, I've been seeing rumors on the web that the ternary operator will support this syntax in PHP6:

$assigned = isset($somevar) ?: 'default';

Even less typing!

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to