PHP log() 函数
PHP 教程
· 2019-01-27 06:13:02
实例
返回不同数的自然对数:
<?php
echo(log(2.7183) . "<br>");
echo(log(2) . "<br>");
echo(log(1) . "<br>");
echo(log(0);
?>
echo(log(2.7183) . "<br>");
echo(log(2) . "<br>");
echo(log(1) . "<br>");
echo(log(0);
?>
定义和用法
log() 函数返回一个数的自然对数,或者以 base 为底的 number 的对数。
语法
log(number,base);
| 参数 | 描述 |
|---|---|
| number | 必需。规定需计算对数的值。 |
| base | 可选。要使用的对数的底。默认是 'e'。 |
技术细节
| 返回值: | 一个数的自然对数,或者以 base 为底的 number 的对数。 |
|---|---|
| 返回类型: | Float |
| PHP 版本: | 4+ |
| PHP 更新日志: | PHP 4.3:新增 base 参数。 |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Inside Larry's and Sergey's Brain
Richard Brandt / Portfolio / 17 Sep 2009 / USD 24.95
You’ve used their products. You’ve heard about their skyrocketing wealth and “don’t be evil” business motto. But how much do you really know about Google’s founders, Larry Page and Sergey Brin? Inside......一起来看看 《Inside Larry's and Sergey's Brain》 这本书的介绍吧!