--TEST-- Test array_key_exists() function : usage variations - floats and casting to ints --FILE-- getMessage() . "\n"; } echo "Cast float to int:\n"; var_dump(array_key_exists((int)$key, $search)); } echo "Done"; ?> --EXPECTF-- *** Testing array_key_exists() : usage variations *** -- Iteration 1 -- Pass float as $key: Deprecated: Implicit conversion from float 1.23456789E-10 to int loses precision in %s on line %d bool(true) Cast float to int: bool(true) -- Iteration 1 -- Pass float as $key: Deprecated: Implicit conversion from float 1.00000000000001 to int loses precision in %s on line %d bool(true) Cast float to int: bool(true) -- Iteration 1 -- Pass float as $key: Deprecated: Implicit conversion from float 1.99999999999999 to int loses precision in %s on line %d bool(true) Cast float to int: bool(true) Done