array_filter的回调返回null

为何会返回NULL无法理解

dump($info);
dump(function_exists('wx_user_info_filter'));
dump(wx_user_info_filter('groupid'));
dump(array_filter($info,'wx_user_info_filter',ARRAY_FILTER_USE_KEY));
/**
 * @param $k
 * @return bool
 */
function wx_user_info_filter($k){
    $arr=array('groupid','subscribe_scene','tagid_list','qr_scene','qr_scene_str');
    if((boolean) in_array(strtolower($k),$arr)){
        return false;
    }else{
        return true;
    }
}
array(17) {
  ["subscribe"] => int(1)
  ["openid"] => string(28) "xxxxxxxx"
  ["nickname"] => string(11) "xxxxxxxx"
  ["sex"] => int(1)
  ["language"] => string(5) "xxxxxxxx"
  ["city"] => string(6) "xxxxxxxx"
  ["province"] => string(6) "xxxxxxxx"
  ["country"] => string(6) "xxxxxxxx"
  ["headimgurl"] => string(133) "xxxxxxxx"
  ["subscribe_time"] => int(1540366847)
  ["remark"] => string(0) ""
  ["groupid"] => int(0)
  ["tagid_list"] => array(0) {
  }
  ["subscribe_scene"] => string(16) "ADD_SCENE_SEARCH"
  ["qr_scene"] => int(0)
  ["qr_scene_str"] => string(0) ""
  ["group_id"] => int(0)
}
bool(true)
bool(false)
NULL
慕勒3428872
浏览 449回答 1
1回答

ABOUTYOU

升级你的php版本 php5.4不支持ARRAY_FILTER_USE_KEY ============ php 7.1 没有复现。
打开App,查看更多内容
随时随地看视频慕课网APP