#21920 [Bgs]: buggy example
| From: | andrey@php.net | Date: | Tue, 28 Jan 2003 16:14:06 +0000 |
| Subject: | #21920 [Bgs]: buggy example | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969351378@lists.php.net to get a copy of this message | ||
ID: 21920
Updated by: andrey@php.net
Reported By: corinl@gmx.de
Status: Bogus
Bug Type: Documentation problem
PHP Version: 4.3.0
New Comment:
Yes, the output on my machine is this. I use the CLI binary.
c:\apache\php>php-cli a_u.php
Array
(
[a] => gr?n
[1] => blau
[2] => rot
)
c:\apache\php>
Andrey
Previous Comments:
------------------------------------------------------------------------
[2003-01-28 10:08:33] corinl@gmx.de
hi!
yes, the ourput is correct...but the documentation is wrong, bacause it
says the example should output:
Array
(
[b] => green
[1] => blue
[2] => red
)
------------------------------------------------------------------------
[2003-01-28 08:42:21] andrey@php.net
Look at the View Source of your browser.
Also when using CLI the output is as it is documented.
------------------------------------------------------------------------
[2003-01-28 07:59:32] corinl@gmx.de
http://de.php.net/manual/de/function.array-unique.php
the example:
$input = array ("a" => "grün", "rot", "b" =>
"grün", "blau", "rot");
$result = array_unique ($input);
print_r($result);
should (and does) print:
Array ( [a] => grün [0] => rot [1] => blau )
and not:
Array
(
[b] => grün
[1] => blau
[2] => rot
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21920&edit=1