Skip to content

Commit

Permalink
array-unique.xml Remove trailing whitespace, CS examples by the way
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalferov authored and Girgias committed Jan 14, 2025
1 parent 5a79bf9 commit 651fad6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions reference/array/functions/array-unique.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<note>
<simpara>
Two elements are considered equal if and only if
<literal>(string) $elem1 === (string) $elem2</literal>, i.e.
<literal>(string) $elem1 === (string) $elem2</literal>, i.e.
when the string representation is the same, the first element will be used.
</simpara>
</note>
Expand Down Expand Up @@ -119,9 +119,11 @@
<programlisting role="php">
<![CDATA[
<?php
$input = array("a" => "green", "red", "b" => "green", "blue", "red");
$input = ["a" => "green", "red", "b" => "green", "blue", "red"];
$result = array_unique($input);
print_r($result);
?>
]]>
</programlisting>
Expand All @@ -144,9 +146,11 @@ Array
<programlisting role="php">
<![CDATA[
<?php
$input = array(4, "4", "3", 4, 3, "3");
$input = [4, "4", "3", 4, 3, "3"];
$result = array_unique($input);
var_dump($result);
?>
]]>
</programlisting>
Expand Down

0 comments on commit 651fad6

Please sign in to comment.