P
P
Peter2015-11-27 09:56:42
IntelliJ IDEA
Peter, 2015-11-27 09:56:42

How to check for duplicates of an array in phpstorm debug mode?

There are more than 2k e-mails in the array.
It is possible that some are repeated, and if so, then the subscriber will receive a duplicate.
In the IDE, I caught an array of selected emails with breakpoints.
bmozpwJI6RvPry.jpg
Does ide have any out-of-the-box means to check for duplicates in an array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Melnichenko, 2015-11-27
@volkov_p_v

You have the subscriber's email as the array key, therefore, since the array cannot have 2 elements with the same keys, it turns out that the elements are all unique.
Records can be repeated in the database, but when the selection is converted to an array and you use one of the fields as a key, only unique values ​​​​get

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question