PHP 7
in_array('one', [0 => 0]) //true
in_array('one', [0]) //true
in_array('one', array_keys([0 => 0])); //true
Expected result is FALSE, because obviously there are no string values in given array, also there are no 'true' values (string can be evaluated to true and match)
If we assume any type comparsion 0 integer is always compared to false in PHP, and String compared to true, so why this works anyway?
I know, strict mode exists and works fine, but anyway absolute annoying why this happend. Any explanation?