PHP pow() 函数

PHP 教程 · 2019-01-27 08:42:46

实例

pow() 的实例:

<?php
echo(pow(2,4) . "<br>");
echo(pow(-2,4) . "<br>");
echo(pow(-2,-4) . "<br>");
echo(pow(-2,-3.2));
?>

定义和用法

pow() 函数返回 x 的 y 次方。

语法

pow(x,y);

参数 描述
x 必需。规定要使用的底。
y 必需。规定指数。

技术细节

返回值: x 的 y 次方。
返回类型: 如果可能则返回 Integer,否则返回 Float。
PHP 版本: 4+
PHP 更新日志: PHP 4.0.6:如果可能则返回 integer。之前的版本只返回 float。
PHP 4.2.0:如果发生错误则不产生任何的警告。

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Building Websites with Joomla!

Building Websites with Joomla!

H Graf / Packt Publishing / 2006-01-20 / USD 44.99

This book is a fast paced tutorial to creating a website using Joomla!. If you've never used Joomla!, or even any web content management system before, then this book will walk you through each step i......一起来看看 《Building Websites with Joomla!》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具