Partially revert 74b4d669a7. Type checks were removed on the
basis that they are redundant with the PHP warnings raised by
array_key_exists(), but PHP 8.0 does not raise such warnings. The
PHP 8.0 migration doc says: "The behavior of array_key_exists()
regarding the type of the key parameter has been made consistent with
isset() and normal array access. All key types now use the usual
coercions and array/object keys throw a TypeError."
We could just remove the tests, but the original rationale does stand,
since without this change, we have
> $m = new MapCacheLRU(4);
> $m->set(3.4, 'x');
> print $m->get(3, 'x');
x
without any warning, which seems surprising.
Bug: T283275
Change-Id: I3628daef21611ff3f6bc252f105deed886ce8088