WordPress函数 - absint()

absint( mixed $maybeint )

Convert a value to non-negative integer.


Parameters

$maybeint

(mixed) (Required) Data you wish to have converted to a non-negative integer.


Return

(int) A non-negative integer.


Source

File: wp-includes/functions.php

function absint( $maybeint ) {
	return abs( (int) $maybeint );
}



Changelog

Changelog
Version Description
2.5.0 Introduced.

发表评论

© 2022 狸玖技术站 - 基于 WordPress