PHP的http_build_query() 方法,数组里面的bool类型会被转化为 1 和 0.
$params = [ 'a' => 'hello', 'b' => true, 'c' => false, ]; echo http_build_query($params); 输出:a=hello&b=1&c=0
$params = [ 'a' => 'hello', 'b' => true, 'c' => false, ]; echo http_build_query($params); 输出:a=hello&b=1&c=0