From b222a4c1355e33aa4dbaea97028d0194b6141b4c Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 5 Feb 2003 08:21:21 +0000 Subject: [PATCH] Fixing examples which almost closes bug #21920. Also, removing old 4.0.4 warning and some touchups. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@114858 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-unique.xml | 51 +++++++++------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/reference/array/functions/array-unique.xml b/reference/array/functions/array-unique.xml index 73c585d168..0694afe398 100644 --- a/reference/array/functions/array-unique.xml +++ b/reference/array/functions/array-unique.xml @@ -1,5 +1,5 @@ - + @@ -29,41 +29,33 @@ Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same. - The first element will be used. - - - This was broken in PHP 4.0.4! - - - <function>array_unique</function> example "green", "red", "b" => "green", "blue", "red"); $result = array_unique ($input); print_r($result); -]]> - - - This will output: - - green + [a] => green + [0] => red [1] => blue - [2] => red ) +*/ +?> ]]> - - + @@ -71,24 +63,21 @@ Array <function>array_unique</function> and types int(4) + [2] => string(1) "3" +} +*/ +?> ]]> - - The printout of the program above will be (PHP 4.0.6): - - - int(4) - [4]=> - int(3) -} -]]> - -