0

Let say we have an array:

$array = ["Key" => true];

Now if we tried to search for any value in that array with in_array function it always returns true:

if( in_array('value', $array) ) echo 'Exists'; // returns exists

Is this behavior is expected or it's just a bug?

Tarek.hms
  • 1,243
  • 1
  • 10
  • 15

0 Answers0