3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = ['test' => 'test', 'test2'=>'another test', 'test3' => 'third test']; $address = ['test' => 'test', 'test2'=>'another test', 'test3' => 'third test diff', 'test4' => 'ignore me bro']; $changes = array_filter($original, function ($key, $data) use ($address) { return $data === $address->getData($key); }, ARRAY_FILTER_USE_BOTH); var_dump($changes);

preferences:
63.78 ms | 402 KiB | 5 Q