note 85878 added to language.types.array

From: Date: Mon, 22 Sep 2008 16:41:43 +0000
Subject: note 85878 added to language.types.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-144615@lists.php.net to get a copy of this message
Discussing this line of manual: "Using the empty string as a key will create (or overwrite) a key with the empty string and its value;" example: <?php $test = array('zero' => 'php.net', '' => 'php.net', "" => 'php.net' ); //test echo $test['zero']."\n<br />"; //output: php.net echo $test['']."\n<br />"; //output: php.net echo $test[""]."\n<br />"; //output: php.net foreach ($test as $key => $value ){ echo "\$key = $key and \$value = $value \n<br />"; } //out put /* $key = zero and $value = php.net $key = and $value = php.net */ ?> I think using empty string is work, so either the manual should change or the array behavior. ---- Server IP: 69.147.83.197 Probable Submitter: 67.159.44.138 ---- Manual Page -- http://www.php.net/manual/en/language.types.array.php Edit -- https://master.php.net/note/edit/85878 Del: integrated -- https://master.php.net/note/delete/85878/integrated Del: useless -- https://master.php.net/note/delete/85878/useless Del: bad code -- https://master.php.net/note/delete/85878/bad+code Del: spam -- https://master.php.net/note/delete/85878/spam Del: non-english -- https://master.php.net/note/delete/85878/non-english Del: in docs -- https://master.php.net/note/delete/85878/in+docs Del: other reasons-- https://master.php.net/note/delete/85878 Reject -- https://master.php.net/note/reject/85878 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144615) next »