Use filter_var_array on whole array, or inside iteration
===

I have a MySQL result set in a PHP multidimensional array.

I want to iterate through it and output it sanitized. Considering the two alternatives below, are there any performance differences?

__filter_var_array on the whole result set before iterating:__

    $sql_rows = filter_var_array($sql_rows, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
    foreach ($sql_rows as $sql_row) {
        print '<p>' . $sql_row['first_name'] . $sql_row['last_name'] . '</p>';
    }

__filter_var_array on each row inside the iteration:__

    foreach ($sql_rows as $sql_row) {
        $sql_row = filter_var_array($sql_row, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
        print '<p>' . $sql_row['first_name'] . $sql_row['last_name'] . '</p>';
    }