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

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

    What you are looking at there is known as type casting - for more information, see the manual page on type juggling.

    The above piece of code casts (or converts) $_GET['page'] to an integer.

提交回复
热议问题