absint()

描述

将值转换为非负整数。

abs( intval( $foo ) 的同义词)。

用法

<?php absint( $maybeint ); ?>

参数

$maybeint

(mixed) (必填) 您希望转换为非负整数的数据。

返回值

非负整数。

历史

添加于 版本: 2.5

源文件

absint() 函数的代码位于 wp-includes/functions.php

/* ———————————-
* wordpress函数 xingkongWeb.com收集
* ———————————- */
/**
* Convert a value to non-negative integer.
*
* @since 2.5.0
*
* @param mixed $maybeint Data you wish to have converted to a non-negative integer.
* @return int A non-negative integer.
*/

function absint( $maybeint ) {

return abs( intval( $maybeint ) );

}
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索