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

后端 未结 9 1308
鱼传尺愫
鱼传尺愫 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:16

    You can find it in the manual in the section type juggling: type casting. (int) casts a value to int and is a language construct, which is the reason that it looks "funny".

提交回复
热议问题