当我使用codeigniter的cli时,数据库结果不会返回

I want to make something to read the results of this. However, cmd, the result does not come out correctly.

When I use codeigniter + CLI

<?php
class Tools extends CI_Controller {
    public function message($to="World")
    {
        echo " Hello {$to}! ".PHP_EOL; 
        echo "test1".PHP_EOL;

        $this->load->database();
        echo "test2".PHP_EOL;

        $query = $this->db->query("SELECT * FROM test3");
        echo "test3".PHP_EOL;
        foreach ($query->result() as $row)
        {
            echo $row->pid.PHP_EOL;
            echo $row->mane.PHP_EOL;
            echo $row->title.PHP_EOL;
        }
    }
}
?>

I want and in cmd

c:\>php index.php tools message world
Hello world!
test1
c:\>

Why am I not able to get an answer? I want

c:\>php index.php tools message world
Hello world!
test1
test2
test3
...
....(about database query)
c:\>