Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.25 KB

README.MD

File metadata and controls

42 lines (32 loc) · 1.25 KB

Array Smart Diff

Latest Stable Version Total Downloads Build Status php version scrutinizer scrutinizer

Author: DrLenux

License: MIT

Doc

<?php

$a = ['a' => 1, 'b' => 2, 'd' => 4];
$b = ['a' => 2, 'b' => 2, 'c' => 3];

\DrLenux\ArrayDiff::getDiff($a, $b);

return

<?php

[
    'a' => [
        'new' => 2, 
        'old' => 1
    ], 
    'c' => [
        'new' => 3
    ], 
    'd' => [
        'old' => 4
    ]
];