The non-strict comparison is necessary, because http_build_query does mangle integer attributes into being strings. This comparison is basically just a quick smell-check for any non-trivial object data.

I think this prompts a higher-level discussion: why not actually use PHP serialize + base64 encode for encoding controller params? Unlike regular query-string where the int -> string conversion is expected, I think that in this case we can encode int/boolean/string/stdClass (but no other objects) using native serialize to fully preserve scalar typing and make actual controller developer not worry about accidentally stringified values. For serialize() data I'd recommend using base64 instead of directly piping into urlencode() because it's a true binary blob.