Home  >  Article  >  Backend Development  >  int门类

int门类

WBOY
WBOYOriginal
2016-06-13 12:36:10803browse

int类型?

<br />
<?<br />
<br />
     $x1=array(1=>111,2=>22111,3=>3333);<br />
     $y1=in_array(111,$x1);<br />
     echo $y1;<br />
     echo "\r\n";<br />
     <br />
     $x2=array(1=>111,2=>2211,3=>3333);<br />
     $y2=in_array('111',$x2);<br />
     echo $y2;<br />
     echo "\r\n";<br />
     <br />
     $x3=array(1=>111,2=>2211,3=>3333);<br />
     $y3=in_array("111",$x3);<br />
     echo $y3;<br />
     echo "\r\n";<br />
    <br />
?><br />


问题:
上面PHP程序,函数第1个参数是:int类型,它可以用以下3种方式表示:
1)111
2)'111'
3)"111"

这样都对,为什么?

Statement:
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