Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于challenge-2 #4

Open
MasonQAQ opened this issue Sep 13, 2018 · 0 comments
Open

关于challenge-2 #4

MasonQAQ opened this issue Sep 13, 2018 · 0 comments

Comments

@MasonQAQ
Copy link

MasonQAQ commented Sep 13, 2018

看了你给出的solution,你已经解释了is_numeric()函数和(int)xxx强转的区别,但是能解释下:

1、$_GET['time'] < 60 * 60 * 24 * 30 * 2
2、(int)$_GET['time']

这两种的区别吗?因为本题过is_numeric容易,但是后面涉及到字符串和整数比较大小时候,按照php的说法,字符串会转化为integer,为什么在进行数值比较时候的类型转化和通过(int)强转的类型转化结果不一致?而且此题貌似在不同环境其解法不一样。忘解惑。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant