PHP difference between int and integer

前端 未结 4 744
情话喂你
情话喂你 2021-01-07 18:59

Is there any difference between int and integer in PHP?

Which is the newer or more recommended use?

$a = (int)\"3 euros\";
         


        
4条回答
  •  长发绾君心
    2021-01-07 19:20

    Quoting the manual:

    Converting to integer

    To explicitly convert a value to integer, use either the (int) or (integer) casts. ...

提交回复
热议问题