Sara Golemon wrote:

the issue is that the array $y below results in an empty string:

$x = array('e' => array('kf' => ''));
$y = array('e' => array('kf' => array()));

echo '\''. http_build_query($x). "'\n";
echo '\''. http_build_query($y) . "'\n";

running on: PHP 5.0.0RC3-dev (cli) (built: Jun  1 2004 18:04:30) (DEBUG)
----
would anybody care to comment as to whether this is what is intended?


I would definately call that intended. What would you expect the resultant query string to look like?

my original assumption was that both cases would produce the same result. I don't see the rationale (although internally it may be obvious) that the second array 'resolves' (is that the correct use of the word?) into an empty string. -

an empty string is a valid value for a param coming from the POST/GET
request, php's loose nature lead me to assume the an empty array in such
a context would result in at least the some output - I went with the
feeling that an empty array is not emptier than an empty string.

anyway, thanks for the feedback.


-Sara


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to