private function compare($key1, $key2) { if ($key1 === $key2) { return 0; } if ($key1 < $key2) { return -1; } return 1; }