$params = [ 'a' => 'hello', 'b' => true, 'c' => false, ]; echo http_build_query($params); 输出:a=hello&b=1&c=0