http_build_query unexpected/bad behaviour

From: Date: Wed, 02 Jun 2004 17:46:45 +0000
Subject: http_build_query unexpected/bad behaviour
Groups: php.internals 
Request: Send a blank email to internals+get-10252@lists.php.net to get a copy of this message
I came accross behaviour in http_build_query() which was thoroughly unexpected. first a little background: I am using http_build_query() which is turning out to be very useful for putting together 'complex' URL 'pieces' (which are then again combined to form complete URLs - bare in mind that some of these pieces are passed along to javascripts so using http_build_query() once to form a complete URL query is not an option). 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? kind regards, Jochem Maas

« previous php.internals (#10252) next »