这句话中的这里是函数吗解决办法

WBOY
Release: 2016-06-13 12:10:32
Original
1010 people have browsed it

这句话中的这里是函数吗

本帖最后由 discuz2015 于 2014-11-27 10:19:42 编辑 $page=$_REQUEST['page']?(int)$_REQUEST['page']:1
这句话中的(int)是什么意思呢,从来没见过这么写法,一个括号里面包一个玩意,这到底是个啥,肯定不是函数了。
------解决思路----------------------
强制类型转换,是从 C 语言继承过来的语法元素

php 会根据上下文自动改变数据类型,所以这个 (int) 是没必要的
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template