#43414 [Opn->Fbk]: Surprising array bug found with special word "lang"

From: Date: Tue, 27 Nov 2007 13:05:13 +0000
Subject: #43414 [Opn->Fbk]: Surprising array bug found with special word "lang"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120129@lists.php.net to get a copy of this message
ID: 43414 Updated by: jani@php.net Reported By: cappytoi at yahoo dot com -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: Windows Xp PHP Version: 5.2.5 New Comment: I tried with CLI: # src/build/php_5_2/sapi/cli/php t.php lang[]=turkce&lang[]=english&lang[]=german And no problems there. In what browser does it give you that? Have you got some weird locale set on your machine or what? Previous Comments: ------------------------------------------------------------------------ [2007-11-26 17:28:20] cappytoi at yahoo dot com also found that using "times" instead of "lang" causes a similar result. ------------------------------------------------------------------------ [2007-11-26 17:12:05] cappytoi at yahoo dot com Description: ------------ Hi, I have found the following problem. I try to produce a query string and I found that using lang as a key makes problem with implode. Reproduce code: --------------- <?php $all = array( 'turkce', 'english', 'german' ); $t = array(); foreach ($all as $al) { $t[] = 'lang[]='.$al; } echo implode('&',$t); ?> Expected result: ---------------- lang[]=turkce&lang[]=english&lang[]=german Actual result: -------------- lang[]=turkce&#9001;[]=english&#9001;[]=german ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43414&edit=1

« previous php.bugs (#120129) next »