-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
看了你给出的solution,你已经解释了is_numeric()函数和(int)xxx强转的区别,但是能解释下:
1、$_GET['time'] < 60 * 60 * 24 * 30 * 2
2、(int)$_GET['time']
这两种的区别吗?因为本题过is_numeric容易,但是后面涉及到字符串和整数比较大小时候,按照php的说法,字符串会转化为integer,为什么在进行数值比较时候的类型转化和通过(int)强转的类型转化结果不一致?而且此题貌似在不同环境其解法不一样。忘解惑。
Metadata
Metadata
Assignees
Labels
No labels