Skip to content

Commit

Permalink
Fix GH-2631: Fix examples for array diff functions (#2634)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois authored Aug 1, 2023
1 parent 98b4495 commit 55b7203
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reference/array/functions/array-diff-assoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<![CDATA[
<?php
$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "green", "yellow", "red");
$array2 = array("a" => "green", "yellow", 1 => "red");
$result = array_diff_assoc($array1, $array2);
print_r($result);
?>
Expand Down
2 changes: 1 addition & 1 deletion reference/array/functions/array-diff-uassoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function key_compare_func($a, $b)
}
$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "green", "yellow", "red");
$array2 = array("a" => "green", "yellow", 1 => "red");
$result = array_diff_uassoc($array1, $array2, "key_compare_func");
print_r($result);
?>
Expand Down

0 comments on commit 55b7203

Please sign in to comment.