Le Sat, 21 Nov 2009 19:52:30 -0800, Rasmus Lerdorf a écrit : > > Or better yet, have your filter function return false if the variable > doesn't exist and use the ternary to set the default. You can do it all > in a single step then. > > $var = filter_func($_GET,'foo')?:42; > > Simple and clean. > > -Rasmus
Yes, as you say, simple and clean ! Have I miss something like that in php ? -- Alban Leroux -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php