How to build and such a structure? The point is to read line by line from two files and pass each line from each file to a function.

while (($textA = fgets($handle, 4096) !== false) && ($textB = fgets($handle2, 4096) !== false)) { $arr = getTextDiff($textA, $textB, $delimeter = "\n"); } 

    1 answer 1

    Assignment has the lowest priority, so you first read, compare, and the result will go into a variable.
    It is necessary to put brackets to first assign, and then compare:

     while ((($textA = fgets($handle, 4096)) !== false) && (($textB = fgets($handle2, 4096)) !== false)) { $arr = getTextDiff($textA, $textB, $delimeter = "\n"); }