PHP判断变量是否为整型

1、使用is_int()

2、使用is_numeric()

两个函数的区别,当变量为'1'时,

is_int()的返回值为false,

is_numeric()的返回值为true

当变量为1时,

两个函数的返回值都为true

 程序猿必读

原文地址:https://www.cnblogs.com/longzhongren/p/6179706.html