如何在PHP中找到2个文件之间的不同行

I'm working on a small PHP application which update a stock products regularly, i'm getting the updated file from the server, and i have the old one in my directory, so what is the best way to get only the updated products(lines) between these two files, for information both files contain arround 70000 product lines.

I though to store the data of each file into an array, then use "array_diff" to compare them, it will work theoretically, but will be good idea with 70000 on each array?

Thanks in advance.

I'd use the diff command. For reference: https://www.geeksforgeeks.org/diff-command-linux-examples/