energy/diff

Compare files with Diff class

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/energy/diff

1.1 2024-12-15 09:00 UTC

This package is auto-updated.

Last update: 2025-09-15 10:45:18 UTC


README

This is a most little working Diff..

<?php

require 'vendor/autoload.php';

$new = file_get_contents('new');
[$diff, $add, $sub] = Diff::diffx($new, file_get_contents('old'));

echo $sub ? "@@ -$sub" : '@@ ',
    $add ? "+$add @@" : ' @@', "\n", $diff;