第一次发问题,请赐教。
自学php中,代码来自《php学习手册》
$c=curl_init('http://api.example.com');
curl_setopt($c,CURLOPT_RETURNTRANSFER,true);
$result=curl_exec($c);
$info=curl_getinfo($c);
if($result===false){
print "Error #".curl_errno($c)."<br/>";
print "Uh-oh!cURL says:".curl_error($c)."<br/>";
}
else if($info['http_code']>=400){
print "The server says HTTP error{$info['http_code']}.<br/>";
}
else{
print "A successful result!<br>";
}
print "By the way,this request took {$info['total_time']} secondes.<br/>";
原书返回的$info['total_time']结果是0.000146浮点数,而我返回的是整数0
By the way,this request took 0 secondes.
请问如何能取消取整,得到与原书类似的浮点数结果?