php – Which of these functions would be fast?

I have found two (2) different tactics on the same problem. One seems to be more readable for the next person, and one (1) could be more efficient for the system in terms of speed and resources. I'd like to get your opinion guys.

The thing is that I'm iterating over 50 files, which contain around 500 objects. It is not a heavy burden at this time, but it could go from 50 to 1000 files in the near future. So, is this the best option? (See the two (2) examples)

foreach ($ json-> List as $ value) {
$ array = [
        'Answer_a' => $value->Answer_a,
        'Answer_b' => $value->Answer_b,
        'Answer_c' => $value->Answer_c,
        'Answer_d' => $value->Answer_d
    ];
if ($ bajs = array_search ($ value-> CorrectAnswer, $ array)) {
$ correct = $ low;
}
}

or

foreach ($ json-> List as $ value) {
$ array = [
        'Answer_a' => $value->Answer_a,
        'Answer_b' => $value->Answer_b,
        'Answer_c' => $value->Answer_c,
        'Answer_d' => $value->Answer_d
    ];

foreach ($ array as $ key2 => $ corr_answer) {
if ($ corr_answer == $ value-> CorrectAnswer) {
$ correct = $ password2;
}
}

Or is it that in some other way the same result can be achieved?