Just to jump in,

count($_POST) _does_ work, as ArrayObject/Iterator implements
Countable. Can you give any examples of where it was not working?

empty($_POST) does not work as you mentioned, cause it's an object and
this is php5, and thus not empty.

array_* functions will not work, and casting the superglobal to array
will return the original unfiltered array. So if you pass a
SuperGlobal to array_* you should call getArrayCopy and such.

I like the idea of making $_P/G/C a filtered object. The only thing
that doesn't work as expected is the empty() (which is a strange thing
to do anyway), and array_* functions, which require you to call
->getArrayCopy(), get_array_copy_raw(), or cast to array. I personally
like the way the superglobals behave, providing a nice way to "make it
safe easy", without being too different from the normal "PHP way".



-- 
Matt Read
http://mattread.com

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to