17. PHP Array Functions-4 | array_diff variations with user-defined callback function | ATIBlog

Published: 21 November 2017
on channel: ATIBlog
467
7

ATI Blog PHP Tutorial in Hindi : Array Functions part - 4.

In this part we cover:

array_diff() – variations with user defined comparison function.

array_udiff_assoc() - like array_diff_assoc()
additional function for values comparison

array_diff_uassoc() - like array_diff_assoc()
additional function for keys comparison

array_diff_ukey() - like array_diff_key()
additional function for key comparison

array_udiff() - like array_diff()
additional function for values comparison

1. array_udiff_assoc()
Same like array_diff_assoc , to check both keys and values.
Need to pass a last parameter as a function for values comparison.
The function should return 0, negative value, positive value.
This function check for “is_different” then , identifies 0 as false, +ve or –ve as true.

2. array_diff_uassoc()
Same like array_diff_assoc , to check both keys and values.
Need to pass a last parameter as a function for keys comparison.
The function should return 0, negative value, positive value.
This function check for “is_different” then , identifies 0 as false, +ve or –ve as true.

3. array_diff_ukey()
Same like array_diff_key , to check keys only.
Need to pass a last parameter as a function for keys comparison.
The function should return 0, negative value, positive value.
This function check for “is_different” then , identifies 0 as false, +ve or –ve as true.

4. array_udiff ()
Same like array_diff , to check values only.
Need to pass a last parameter as a function for values comparison.
The function should return 0, negative value, positive value.
This function check for “is_different” then , identifies 0 as false, +ve or –ve as true.


On this page of the site you can watch the video online 17. PHP Array Functions-4 | array_diff variations with user-defined callback function | ATIBlog with a duration of hours minute second in good quality, which was uploaded by the user ATIBlog 21 November 2017, share the link with friends and acquaintances, this video has already been watched 467 times on youtube and it was liked by 7 viewers. Enjoy your viewing!