无需言 做自己 业 ,精于勤 荒于嬉.
- Math 函数 abs 绝对值
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php $abs = abs(-4.2); // $abs = 4.2; (double/float)$abs2 = abs(5); // $abs2 = 5; (integer)$abs3 = abs(-5); // $abs3 = 5; (integer)?>
- Math 函数 dechex 十进制转换为十六进制
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo dechex(10) . "\n"; echo dechex(47); ?>
示例2
<?php // The output below assumes a 32-bit platform.// Note that the output is the same for all values.echo dechex(-1)."\n"; echo dechex(PHP_INT_MAX * 2 + 1)."\n"; echo dechex(pow(2, 32) - 1)."\n"; ?>
- Math 函数 atanh 反双曲正切
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
- Math 函数 decbin 十进制转换为二进制
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo decbin(12) . "\n"; echo decbin(26); ?>
- Math 函数 cosh 双曲余弦
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
- Math 函数 deg2rad 将角度转换为弧度
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo deg2rad(45); // 0.785398163397var_dump(deg2rad(45) === M_PI_4); // bool(true)?>
- Math 函数 exp 计算 e 的指数
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo exp(12) . "\n"; echo exp(5.7); ?>
- Math 函数 cos 余弦
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo cos(M_PI); // -1?>
- Math 函数 expm1 返回 exp(number) - 1,甚至当 number 的值接近零也能计算出准确结果
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
expm1
(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)
expm1 — 返回 exp(number) - 1,甚至当 number 的值接近零也能计算出准确结果
说明
expm1(float$arg
): floatexpm1() 返回 'exp(
number
) - 1',甚至当number
的值接近零也能计算出准确结果。但是当两个数值趋近于相等的时候, 'exp (number
) - 1' 就会变得不太准确。参数
-
arg
-
要处理的参数
返回值
'e' to the power of
arg
minus one更新日志
版本 说明 5.3.0 此函数在所有平台上均可用 -
- Math 函数 decoct 十进制转换为八进制
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo decoct(15) . "\n"; echo decoct(264); ?>
- Math 函数 fdiv Divides two numbers, according to IEEE 754
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php var_dump(fdiv(5.7, 1.3)); // float(4.384615384615385)var_dump(fdiv(4, 2)); // float(2)var_dump(fdiv(1.0, 0.0)); // float(INF)var_dump(fdiv(-1.0, 0.0)); // float(-INF)var_dump(fdiv(0.0, 0.0)); // float(NAN)?>
- Math 函数 ceil 进一法取整
-
发表日期:2021-07-01 08:56:06 | 来源: | 分类:Math 函数
-
示例1
<?php echo ceil(4.3); // 5echo ceil(9.999); // 10echo ceil(-3.14); // -3?>
- Math 函数 atan2 两个参数的反正切
-
发表日期:2021-07-01 08:56:05 | 来源: | 分类:Math 函数
-
atan2
(PHP 4, PHP 5, PHP 7, PHP 8)
atan2 — 两个参数的反正切
说明
atan2(float$y
, float$x
): float本函数计算两个变量
x
和y
的反正切值。和计算y
/x
的反正切相似,只除了两个参数的符号是用来确定结果的象限之外。本函数的结果为弧度,其值在 -PI 和 PI 之间(包括 -PI 和 PI)。
参数
-
y
-
Dividend parameter
-
x
-
Divisor parameter
返回值
x
和y
的反正切弧度值。 -
- Math 函数 asinh 反双曲正弦
-
发表日期:2021-07-01 08:56:05 | 来源: | 分类:Math 函数
- Math 函数 asin 反正弦
-
发表日期:2021-07-01 08:56:05 | 来源: | 分类:Math 函数
- 可交换图像信息 exif_thumbnail 取得嵌入在 TIFF 或 JPEG 图像中的缩略图
-
发表日期:2021-07-01 08:56:03 | 来源: | 分类:可交换图像信息
-
示例1
<?php if (array_key_exists('file',$_REQUEST)) { $image = exif_thumbnail($_REQUEST['file'], $width, $height, $type); } else { $image = false; } if ($image!==false) { header("Content-type: ".image_type_to_mime_type($type)); echo $image; exit; } else { // no thumbnail available, handle the error here echo "No thumbnail available"; } ?>
- 可交换图像信息 read_exif_data 别名 exif_read_data()
-
发表日期:2021-07-01 08:56:03 | 来源: | 分类:可交换图像信息
-
警告
This alias was DEPRECATED in PHP 7.2.0, and REMOVED as of PHP 8.0.0.
说明
此函数是该函数的别名: exif_read_data().
更新日志
版本 说明 7.2.0 这个函数别名被废弃。
- GD 和图像处理 函数 imagetruecolortopalette 将真彩色图像转换为调色板图像
-
发表日期:2021-07-01 08:56:02 | 来源: | 分类:GD 和图像处理 函数
-
示例1
<?php // Create a new true color image$im = imagecreatetruecolor(100, 100); // Convert to palette-based with no dithering and 255 colorsimagetruecolortopalette($im, false, 255); // Save the imageimagepng($im, './paletteimage.png'); imagedestroy($im); ?>
- GD 和图像处理 函数 imagesetstyle 设定画线的风格
-
发表日期:2021-07-01 08:56:02 | 来源: | 分类:GD 和图像处理 函数
-
示例1
<?php header("Content-type: image/jpeg"); $im = imagecreatetruecolor(100, 100); $w = imagecolorallocate($im, 255, 255, 255); $red = imagecolorallocate($im, 255, 0, 0); /* 画一条虚线,5 个红色像素,5 个白色像素 */ $style = array($red, $red, $red, $red, $red, $w, $w, $w, $w, $w); imagesetstyle($im, $style); imageline($im, 0, 0, 100, 100, IMG_COLOR_STYLED); /* 用 imagesetbrush() 和 imagesetstyle 画一行笑脸 */ $style = array($w, $w, $w, $w, $w, $w, $w, $w, $w, $w, $w, $w, $red); imagesetstyle($im, $style); $brush = imagecreatefrompng("http://www.libpng.org/pub/png/images/smile.happy.png"); $w2 = imagecolorallocate($brush, 255, 255, 255); imagecolortransparent($brush, $w2); imagesetbrush($im, $brush); imageline($im, 100, 0, 0, 100, IMG_COLOR_STYLEDBRUSHED); imagejpeg($im); imagedestroy($im); ?>
- GD 和图像处理 函数 imagetypes 返回当前 PHP 版本所支持的图像类型
-
发表日期:2021-07-01 08:56:02 | 来源: | 分类:GD 和图像处理 函数
-
示例1
<?php if (imagetypes() & IMG_PNG) { echo "PNG Support is enabled"; } ?>
- 前端开发(1)
- 数据库(0)
- PHP(0)
- PHP杂项(34)
- PHP基础-李炎恢系列课程(20)
- 中文函数手册(0)
- 错误处理 函数(13)
- OPcache 函数(6)
- PHP 选项/信息 函数(54)
- Zip 函数(10)
- Hash 函数(15)
- OpenSSL 函数(63)
- Date/Time 函数(51)
- 目录函数(9)
- Fileinfo 函数(6)
- iconv 函数(11)
- 文件系统函数(81)
- 多字节字符串 函数(57)
- GD 和图像处理 函数(114)
- 可交换图像信息(5)
- Math 函数(50)
- 程序执行函数(11)
- PCNTL 函数(23)
- JSON 函数(4)
- SPL 函数(15)
- URL 函数(10)
- cURL 函数(32)
- 网络 函数(33)
- FTP 函数(36)
- Session 函数(23)
- PCRE 函数(11)
- PCRE 正则语法(19)
- 数组 函数(81)
- 类/对象 函数(18)
- 函数处理 函数(13)
- 变量处理 函数(37)
- SimpleXML 函数(3)
- 杂项 函数(31)
- 字符串 函数(101)
- JAVA(0)
- Android(0)
- Linux(0)
- 其他(0)