除了field以外,还可以有局部变量(local var),全局变量(global var,C#不支持),静态变量(static var)。函数的参数也可看成是一种变量。
基于18个网页-相关网页
local var
局部变量
以上为机器翻译结果,长、整句建议使用 人工翻译 。
Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.
在一个函数里如果只声明一个全局变量而没在函数中调用它,同样会减慢速度(其程度相当于递增一个局部变量)。PHP很有可能会检查看是否存在全局变量。
youdao
应用推荐
模块上移
模块下移
不移动