PHP 7:意外死亡,没有错误消息

I have what it must be a very simple method, but it's unexpectedly diying at 'return' line and not throwing any errors. I already enabled error reporting E_All; I already checked apache error_log;

What am I missing?

public function get_by_state_id(int $state_id){
    $db = new mysqli('localhost', 'root', '', 'foo');
    $query = "
        SELECT *
        FROM {$this->table}
        WHERE state_id = ?
        ORDER BY name";
    if($stmt = $db->prepare($query)){
        $stmt->bind_param('i',$state_id);
        $stmt->execute();
        $res = $stmt->get_result();

        $rows = [];

        while($obj = $res->fetch_object()){
            $rows[] = $obj;
        }

        return $rows;
    }
}

As @Dharman point me out: the error was due to be echoing unscaped utf8 chars.

It was solved adding this right after the mysql connection:

$db->set_charset('utf8mb4');

He also provided a link to read more about it: UTF-8 all the way through