This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list.
It used to be hard to find questions about operators and other syntax tokens.¹
The main idea is to have links to existing questions on Stack Overflow, so it's easier for us to reference them, not to copy over content from …
我正在'解剖'PunBB,它的一个函数检查BBCode标签的结构并尽可能修复简单的错误:
function preparse_tags($text, &$errors, $is_signature = false)
Run Code Online (Sandbox Code Playgroud)
什么是&在前面的$error变量是什么意思?
有人可以解释一下"&"在下面的内容:
class TEST {
}
$abc =& new TEST();
Run Code Online (Sandbox Code Playgroud)
我知道这是参考.但有人可以说明为什么以及何时需要这样的东西?或者将我指向一个可以很好地解释的网址.我无法理解这个概念.
非常感谢你.