It will compare source file with destination and trigger an exception if the content does not match. It uses md5_file which basically gets the content of the file and builds a md5 hash on it. We could compare directly but thought using this might use less memory etc (have not tested it and memory might not even be a problem but they all do the same in the end)
@mattab feel free to merge. Not sure if it will prevent such issues in the future or whether there are any side effects but should work. Maybe you can release a new beta and we can see? Only checking PHP files as they are most critical and for faster performance / less memory.