Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61060 invoked by uid 1010); 2 Jun 2004 17:46:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61011 invoked from network); 2 Jun 2004 17:46:48 -0000 Received: from unknown (HELO conan.ard.nu) (217.148.166.184) by pb1.pair.com with SMTP; 2 Jun 2004 17:46:48 -0000 Received: from [127.0.0.1] (helo=iamjochem.com) by conan.ard.nu with esmtp (Exim 4.32) id 1BVZp9-00020P-Oc for internals@lists.php.net; Wed, 02 Jun 2004 19:46:47 +0200 Message-ID: <40BE1285.9010701@iamjochem.com> Date: Wed, 02 Jun 2004 19:46:45 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: php internals Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: http_build_query unexpected/bad behaviour From: jochem@iamjochem.com (Jochem Maas) 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