[PHP-BUG] Doc #81508 [NEW]: http_build_query returns empty string given ArrayIterator as input

[email protected] ("mintobit at gmail dot com")
Newsgroups php.doc.bugs
Message-ID <[email protected]>
From:             mintobit at gmail dot com
Operating system: Linux
PHP version:      7.4.24
Package:          URL related
Bug Type:         Documentation Problem
Bug description:http_build_query returns empty string given ArrayIterator as input

Description:
------------
Have not found anything related here
https://www.php.net/manual/en/migration74.incompatible.php. Would
appreciate if somebody can explain why this happened: wondering if this
is expected and should be documented.

Test script:
---------------
<?php

$array = [
    ['ids' => [1,2,3,4]],
    ['key' => 1]
];

var_dump(http_build_query(new ArrayIterator($array)));

Expected result:
----------------
string(92)
"0%5Bids%5D%5B0%5D=1&0%5Bids%5D%5B1%5D=2&0%5Bids%5D%5B2%5D=3&0%5Bids%5D%5B3%5D=4&1%5Bkey%5D=1"

Actual result:
--------------
string(0) ""

-- 
Edit bug report at https://bugs.php.net/bug.php?id=81508&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81508&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81508&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81508&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81508&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81508&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81508&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81508&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81508&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81508&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81508&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81508&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81508&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81508&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81508&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81508&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81508&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81508&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.