Is php's 'include' a function or a statement?

前端 未结 9 2083
梦谈多话
梦谈多话 2020-11-29 10:57

There are plenty of examples of both on the web. The php manual says \"The include() statement [...]\", which seems contradictory - if it\'s a statement shouldn\'t it not ha

9条回答
  •  暖寄归人
    2020-11-29 11:28

    Both. In many areas of the PHP documentation, everything is referred to as a statement. Example (from control structures) - "A statement can be an assignment, a function call, a loop, a conditional statement or even a statement that does nothing (an empty statement)."

    The difference between a statement and a functions is a matter of the semantics of the individual language. Thus, it's up the PHP maintainers to either explicitly define this, or let it remain ambiguous.

提交回复
热议问题