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

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

    this kind of syntax (int) is called type casting. Basically it takes the variable following it and tries to force it into being an int

提交回复
热议问题