What does (int) $_GET['page'] mean in PHP?

后端 未结 9 1353
鱼传尺愫
鱼传尺愫 2021-02-18 23:02

I tried looking up (int) but could only find documentation for the function int() in the PHP manual.

Could someone explain to me what the above

9条回答
  •  心在旅途
    2021-02-18 23:11

    It convert (tries at least) whatever the value of the variable is to a integer. If there are any letter etc, in front it will convert to a 0.

    ?>

提交回复
热议问题