What is the fastest way to compare if keys from two arrays are equal?
eg,
array1: array2: 'abc' => 46, 'abc' => 46, 'def' => 134, 'def' => 134, 'xyz' => 34, 'xyz' => 34,
in this case the result should be TRUE (same keys)
and
array1: array2: 'abc' => 46, 'abc' => 46, 'def' => 134, 'def' => 134, 'qwe' => 34, 'xyz' => 34, 'xyz' => 34,
the result should be FALSE (some keys are different)
array_diff_key () returns an empty array ...
source share