is_int 检测变量是否是整数

2017-03-06 10:13:21

is_int

(PHP 4, PHP 5)

is_int — 检测变量是否是整数

描述

bool is_int ( mixed $var )

如果 var 是 integer 则返回 TRUE,否则返回 FALSE

Note:

若想测试一个变量是否是数字或数字字符串(如表单输入,它们通常为字符串),必须使用 is_numeric()


参见 is_bool()is_float()is_integer()is_numeric()is_string()is_array() 和 is_object()

  • 2017-11-06 01:00:17

    撤销git add

    如何撤销git add,不小心执行了git add . 操作,但是又不能提交所有的文件,因为对应不同的分支,现在怎么样可以将git add 撤销回来

  • 2017-11-10 00:06:15

    CORS: credentials mode is 'include'

    XMLHttpRequest cannot load http://localhost/Foo.API/token. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:5000' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.