numbers.php-master数字PHP库
<?php require_once(__DIR__ . '/../vendor/autoload.php'); // Let's consider some really basic examples. echo '<pre>'; // Adding up elements in an array. But wait! First we need an array... // Let's get a random sample of 50 values, in the range 0, 100. $random = NumbersPHP\Statistic::randomSample(0, 100, 50); echo 'Random = {' . implode(', ', $random) . "}\n"; // Add them up... $sum = NumbersPHP\Basic::sum($random); echo 'Sum of Random = ' . $sum . "\n"; // We can do some other cool stuff as well. Like find the GCD between // two integers. $gcd = NumbersPHP\Basic::gcd(100, 10); echo 'GCD amongst 100 and 10 = ' . $gcd; echo '</pre>';
如果你需要处理很多条数字数据,那么你一定能用得到本库。
免责声明
本站所有资源均由网友贡献或各大下载网站转载。请自行检查软件的完整性!本站所有资源仅供学习参考。请不要将它们用于商业目的。否则,一切后果由您负责!如有侵权,请联系我们删除。联系方式:admin@php.cn
相关文章

21 Oct 2019
数据库php汉字乱码是因为UTF-8编码设置不正确,其解决办法是在创建数据库时执行语句“CREATE DATABASE `dbname` DEFAULT CHARACTER SETutf8 COLLATE utf8_general_ci”。

27 Oct 2024
PHP 中的数组到字符串转换当尝试选择数据库值并使用 PHP 的 SELECT 语句显示它时,您可能会遇到一个常见错误...


Hot Tools

热门文章
丢失记录:Bloom&Rage -Corey和Dylan的锁组合
19 Feb 2025
手游攻略
王国来:拯救2-婚礼要买的衣服
05 Feb 2025
手游攻略
Hello Kitty Island冒险:重新启动机器人任务演练
16 Feb 2025
手游攻略
丢失的记录:Bloom&Rage-成就/奖杯指南
19 Feb 2025
手游攻略
王国来:拯救2-如何获得Comfrey
07 Feb 2025
手游攻略