先来段定义:

A language construct is a syntactically allowable part of a program that may be formed from one or more lexical tokens in accordance with the rules of a programming language. The term Language Constructs is often used as a synonym for control structure, and should not be confused with a function.

PHP中的language construct: include, require,isset, print, echo, array , list,empty include和require 比较常见,例如这一段:这里有三个文章件,b.php包含了c.php和d.php #b.php: #c.php: #d.php 运行一下b.php:

file c.php string(8) “return c” file d.php string(8) “return d”

证明include 和require都是有返回值的.但是从语法上看,include,require都不是函数写法. Array不是函数,这就比较好理解了,你见过哪个函数用function(“var1”=>”var2”)这种写法的? 值的注意的是,empty也不是函数,看这么一段代码: some_var); var_dump(empty($myobject->some_var)); 运行它,得到结果:

string(17) “value of some_var” bool(true)

看到了吗,虽然你能取到myobject->some_var这个值,但是用empty来判断时,却判断为空.