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

From: Date: Mon, 26 Nov 2007 17:28:21 +0000
Subject: #43414 [Opn]: Surprising array bug found with special word "lang"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120097@lists.php.net to get a copy of this message
ID: 43414 User updated by: cappytoi at yahoo dot com Reported By: cappytoi at yahoo dot com Status: Open Bug Type: Arrays related Operating System: Windows Xp PHP Version: 5.2.5 New Comment: also found that using "times" instead of "lang" causes a similar result. Previous Comments: ------------------------------------------------------------------------ [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 (#120097) next »