Console program "Difference Calculator" that determines the difference between two data structures.
It is a project of PHP courses from the Hexlet educational portal.
- Support for different input formats: yaml and json.
- Report generation in the form of plain text, stylish and json.
- PHP 8.0+
- Composer
$ git clone https://github.com/kaivladimirv/php-project-48.git
$ cd php-project-48
$ make install
gendiff (-h | --help)
gendiff (-v | --version)
gendiff [--format] < firstFile > < secondFile >
Comparing two flat json files
$ ./bin/gendiff file1.json file2.json
Comparing two flat yaml files
$ ./bin/gendiff file1.yaml file2.yaml
Comparing two json files with recursive structure
$ ./bin/gendiff file1.json file2.json
Comparing two json files with use plain formatter
$ ./bin/gendiff --format plain file1.json file2.json
Comparing two files with use json formatter
$ ./bin/gendiff --format json file1.json file2.json
The Difference Calculator project is licensed for use under the MIT License (MIT). Please see LICENSE for more information.