ZF2-411: Validator\InArray not able to compare string values to ints
With the check for int 0 in haystack at the start of InArray::isValid, comparing input against ints becomes impossible unless strict mode is enabled. Of course, if trying to compare string "0" against int 0, then it's impossible as a strict check will fail, and you don't have the option to not use strict mode owing to the exception being thrown because int 0 is in haystack.
Fix is simple - remove the check that throws an exception at the start of the method along with the unit test. Maybe a better unit test should be devised that tests "0" against array(0,5,10) which passes with strict false, and fails on strict true.
The original 'issue' (http://framework.zend.com/issues/browse/ZF2-337) where the developer is comparing a string against an int 0 will return true when any string that doesn't start with a digit is tested against int 0. The original bug report is incorrect, "6asdf" will return 6, not int 0 as suggested by the bug reporter. That's correct PHP behaviour and a bug of the developer, not a bug of ZF2.