--TEST-- Test array_key_exists() function : usage variations - Pass different data types as $key arg --FILE-- 'val', 'two', 10 => 'value'); //get an unset variable $unset_var = 10; unset ($unset_var); // get a class class classA { public function __toString() { return "key"; } } // heredoc string $heredoc = <<getMessage() . "\n"; } $iterator++; }; fclose($fp); echo "Done"; ?> --EXPECTF-- *** Testing array_key_exists() : usage variations *** -- Iteration 1 -- bool(true) -- Iteration 2 -- bool(true) -- Iteration 3 -- bool(false) -- Iteration 4 -- bool(false) -- Iteration 5 -- bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- bool(true) -- Iteration 8 -- bool(true) -- Iteration 9 -- bool(true) -- Iteration 10 -- bool(true) -- Iteration 11 -- bool(false) -- Iteration 12 -- bool(false) -- Iteration 13 -- Illegal offset type -- Iteration 14 -- bool(true) -- Iteration 15 -- bool(true) -- Iteration 16 -- bool(true) -- Iteration 17 -- Illegal offset type -- Iteration 18 -- bool(false) -- Iteration 19 -- bool(false) -- Iteration 20 -- Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d bool(false) Done