I know this may be a silly question, but I come across a snippet of php code that check if the $_POST
is_array()
before execute other functions.
Its always an array as many already gave said.
I think the intention is maybe to check for an empty array. !empty($_POST) should do just fine.
Maybe the coder has sections where the array is changed to a string (dumb if you ask me) and wants to make the check, else if that statement comes first, then its unnecessary