composer global require rustam/php-project-lvl2
gendiff -h
Generate diffUsage: gendiff (-h|--help) gendiff (-v|--version) gendiff [--format <fmt>] <firstFile> <secondFile>
Options: -h --help Show this screen -v --version Show version --format <fmt> Report format [default: pretty]
genDiff('before.json', 'after.json', 'plain);
before.json after.json paths to files. format - output format.
You can use absolute and relative file paths to compare files
The utility is also capable of comparing files with a nested structure.
The utility is capable of displaying the result in three versions
-Plian
-Pretty [default]
-JSON
JSON:
Plain:
Supported file formats for comparison: .json .yaml .yml