大家帮忙看一下这段简单的代码哪里有有关问题

WBOY
Release: 2016-06-13 12:40:35
Original
881 people have browsed it

大家帮忙看一下这段简单的代码哪里有问题

<br />
    private function getUserInfo(callable $Human)<br />
    {<br />
        try {<br />
            $users = (new $Human)->getUser()['users'];<br />
            $underageUsers = [foreach ($users as $user) if ($user->age < 18) yield $user];<br />
            <br />
            list($userNames, $ages) = array_map(<br />
                function($value) {return array_column($value, array('userNames', 'ages'), default);}, <br />
                mb_convert_encoding($underageUsers, 'utf-8', 'gbk')<br />
            );<br />
            <br />
            return ['name' => $userNames, 'surname' => $ages];<br />
        } catch(Exception $e) {<br />
            error_log($e);<br />
        }<br />
    }<br />
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template