PHP ReflectionMethod没有获得param的默认布尔值

When I try to get the value of a boolean param, with ReflectionMethod, that have a default value set, I got empty result.

With this code:

    public function GetOrderBook($symbol = null, $limit = 100, $async = false)
    {
        if ($symbol !== null) {

            $params = [];
            $ref = new \ReflectionMethod($this, 'GetOrderBook');

            foreach ($ref->getParameters() as $param) {
                $name = $param->name;
                $params[$name] = $$name;
            }

            print_r($params);
        }
    }

I get this:

 Array ( 
      [symbol] => ETHBTC 
      [limit] => 100 
      [async] => 
 ) 

Is there a way to get the default value of a param with reflection?

print_r function outputs string representation of values. String representation of false is empty string. To see real values that you have in an array, use var_dump:

var_dump($params);

After that you will see that:

["async"]=>bool(false)