如何在php中转换e-06

如何在php中转换e-06,php,Php,我想把e-06转换成PHP中的数字 我的代码是: <?php $hashrate = 5000000000; $str = file_get_contents('http://alloscomp.com/bitcoin/calculator/json?hashrate='.$hashrate.''); $data = json_decode($str, true); // decode the JSON into an associative array $coinperhour = $d

我想把e-06转换成PHP中的数字 我的代码是:

<?php
$hashrate = 5000000000;
$str = file_get_contents('http://alloscomp.com/bitcoin/calculator/json?hashrate='.$hashrate.'');
$data = json_decode($str, true); // decode the JSON into an associative array
$coinperhour = $data['coins_per_hour'];
echo $coinperhour;
?>

运行代码后,它显示为2.2015778741378E-6。如何将其转换为数字?
我尝试使用
echo(int)$coinperhour但是代码显示0,如何修复它?我想知道代码是显示0.00000220157。谢谢你

这是一个号码already@MikeDaVinci我已经测试了代码,但是代码显示0
(int)$coinperhour
你知道
2*10^-6
小于1,所以转换成整数时(自然)会得到0吗?@Alexandro Setiawan很乐意帮忙
$i = 2.2015778741378E-6;
echo $i;                    // 2.2015778741378E-6
echo number_format ($i,11); // 0.00000220158