3v4l.org

run code in 200+ PHP versions simultaneously
<?php $m = [ 'foo' => 'aaa', 'bar' => 'bbb', 'baz' => 'ccc', ]; $v = 'bbb'; var_dump(in_array($v, $m, true)); $v = 'zzz'; var_dump(in_array($v, $m, true));
based on SdAjM
Output for 7.1.25 - 7.4.0rc2
bool(true) bool(false)