Download
Download Latest
Version Support Policy
Documentation
Documentation Home
Tutorial
Project
Governance
Branding
License
GitHub Repository
Community
Contribute to PHP
Online Communities
Events | Conferences
Mailing Lists
PHP 8.5
All Releases
Search docs
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Exceptions
Generators
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Filesystem Security
Database Security
Error Reporting
Using Register Globals
User Submitted Data
Magic Quotes
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Safe Mode
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Credit Card Processing
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
Math 函数
PHP Manual
PHP Manual
»
Math
»
Math 函数
Math 函数
目录
abs
— 绝对值
acos
— 反余弦
acosh
— 反双曲余弦
asin
— 反正弦
asinh
— 反双曲正弦
atan
— 反正切
atan2
— 两个参数的反正切
atanh
— 反双曲正切
base_convert
— 在任意进制之间转换数字
bindec
— 二进制转换为十进制
ceil
— 进一法取整
cos
— 余弦
cosh
— 双曲余弦
decbin
— 十进制转换为二进制
dechex
— 十进制转换为十六进制
decoct
— 十进制转换为八进制
deg2rad
— 将角度转换为弧度
exp
— 计算 e 的指数
expm1
— 返回 exp($num) - 1,甚至当 number 的值接近零也能计算出准确结果
fdiv
— Divides two numbers, according to IEEE 754
floor
— 舍去法取整
fmod
— 返回除法的浮点数余数
fpow
— Raise one number to the power of another, according to IEEE 754
hexdec
— 十六进制转换为十进制
hypot
— 计算直角三角形的斜边长度
intdiv
— 对除法结果取整
is_finite
— 判断浮点数是否是有效的有限值
is_infinite
— 判断浮点数是否为无限值
is_nan
— 判断浮点数是否是否为 NAN
log
— 自然对数
log10
— 以 10 为底的对数
log1p
— 返回 log(1 + number),甚至当 number 的值接近零也能计算出准确结果
max
— 找出最大值
min
— 找出最小值
octdec
— 八进制转换为十进制
pi
— 得到圆周率值
pow
— 指数表达式
rad2deg
— 将弧度数转换为相应的角度数
round
— 对浮点数进行四舍五入
sin
— 正弦
sinh
— 双曲正弦
sqrt
— 平方根
tan
— 正切
tanh
— 双曲正切
↑
and
↓
to navigate •
Enter
to select •
Esc
to close •
/
to open
Press
Enter
without selection to search using Google