|
Posted by d on 09/27/17 11:37
"Justin Koivisto" <justin@koivi.com> wrote in message
news:veGdnQAlru3PlVDeRVn-gg@onvoy.com...
>d wrote:
>>
>> I turned off a module in our engine, and you are correct - IIS won't set
>> QUERY_STRING unless prompted to. Regardless, it still doesn't merit
>> calling
>> isset, is_array, and count just to check whether a string is empty or
>> not.
>
> It's not a string, it's an array. To each their own on how to check. I
> just like to be complete - it gives less chance of bugs down the road.
> When you've been doing full-time php development for 6 years, then you
> can criticize my merit of how I do things.
The $_SERVER["QUERY_STRING"] is a string. Checking an array constructed
from the contents of a string is pointless - just check the string. If you
want to use a mixture of constructs and functions to determine the
characteristics of an array over just checking whether a string is empty,
then go right ahead.
And, funnily enough, I've been coding PHP professionally "full-time" for 7
years, so it seems I can criticise the merit of how you do things. Thanks
for letting me know ;)
>
> --
> Justin Koivisto, ZCE - justin@koivi.com
> http://koivi.com
Navigation:
[Reply to this message]
|