【发布时间】:2011-04-13 19:43:37
【问题描述】:
这是什么?
这是一个关于 PHP 语法的问题的集合。这也是一个社区 Wiki,因此邀请所有人参与维护此列表。
这是为什么?
过去很难找到有关运算符和其他语法标记的问题。¹
主要思想是在 Stack Overflow 上提供现有问题的链接,以便我们更轻松地引用它们,而不是复制 PHP 手册中的内容。
注意:自 2013 年 1 月起,Stack Overflow does support special characters。只需用引号将搜索词括起来,例如[php] "==" vs "==="
我应该在这里做什么?
如果您因为提出这样的问题而被某人指向这里,请在下面找到特定的语法。 PHP manual 的链接页面以及链接的问题可能会回答您的问题。如果是这样,我们鼓励您投票赞成答案。此列表不能替代其他人提供的帮助。
名单
如果您的特定令牌未在下面列出,您可能会在 List of Parser Tokens 中找到它。
&Bitwise Operators 或References
- What does it mean to start a PHP function with an ampersand?
- Understanding PHP & (ampersand, bitwise and) operator
- PHP "&" operator
- Difference between & and && in PHP
- What does "&" mean here in PHP?
- What does "&" mean in this case?
- What does the "&" sign mean in PHP?
- What does this signature mean (&) in PHP?
- How does the "&" operator work in a PHP function?
- What does & in &2 mean in PHP?
- When should I use a bitwise operator?
- Is there ever a need to use ampersand in front of an object? (&$)
=&References
- Reference assignment operator in PHP, =&
- What do the "=&" and "&=" operators in PHP mean?
- What do the '&=' and '=&' operators do?
- What does =& mean in PHP?
&=Bitwise Operators
&&Logical Operators
- 'AND' vs '&&' as operator
- Difference between & and && in PHP
- Is there any difference between "and" and "&&" operators in PHP?
- PHP - and / or keywords
- What does the percent sign mean in PHP?
- What is the PHP operator % and how do I use it in real-world examples?
- What is the use of the @ symbol in PHP?
- 'At' symbol before variable name in PHP: @$_POST
- PHP functions and @functions
- Should I use @ in my PHP code?
- What does @ mean in PHP?
- What are the PHP operators "?" and ":" called and what do they do?
- ?: operator (the 'Elvis operator') in PHP
- Where can I read about conditionals done with "?" and ":" (colon)?
- Using PHP 5.3 ?: operator
??Null Coalesce Operator(PHP 7 起)
?string
?int
?array
?bool
?floatNullable return type declaration(PHP 7.1 起)
:Alternative syntax for control structures、Ternary Operator、Return Type Declaration
- What do two colons mean in PHP?
- What's the meaning of the PHP token name T_PAAMAYIM_NEKUDOTAYIM?
- What's the difference between :: (double colon) and -> (arrow) in PHP?
- What exactly are late static bindings in PHP?
- static::staticFunctionName()
- Unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting T_NS_Separator
->Classes And Objects
- What is the "->" PHP operator called?
- Where do we use the object operator "->" in PHP?
- What's the difference between :: (double colon) and -> (arrow) in PHP?
- What does the PHP syntax $var1->$var2 mean?
- What does "->" mean/refer to in PHP?
=>Arrays
>>Bitwise Operators
<<Bitwise Operators
<<<Heredoc or Nowdoc
- What does <<<END mean in PHP?
- PHP expression <<<EOB
- In PHP, what does "<<<" represent?
- Using <<<CON in PHP
- What's this kind of syntax in PHP?
- How do the PHP equality (== double equals) and identity (=== triple equals) comparison operators differ?
- PHP != and == operators
- The 3 different equals
- Type-juggling and (strict) greater/lesser-than comparisons in PHP
- What does "===" mean?
- How do the PHP equality (== double equals) and identity (=== triple equals) comparison operators differ?
- The 3 different equals
- Type-juggling and (strict) greater/lesser-than comparisons in PHP
- PHP != and == operators
- Is there a difference between !== and != in PHP?
- comparing, !== versus !=
- What is the difference between <> and !=
<>Comparison Operators
- PHP operator <>
- PHP's <> operator
- What is the difference between <> and !=
- Type-juggling and (strict) greater/lesser-than comparisons in PHP
<=>Comparison Operators(PHP 7.0 起)
- What is the difference between the | and || operators?
- What Does Using A Single Pipe '|' In A Function Argument Do?
- What is the difference between the | and || operators?
- PHP - and / or keywords
- What exactly does || mean?
- The behaviour of the or operator in PHP
+Arithmetic Operators,Array Operators
+= 和 -= Assignment Operators
++ 和 -- Incrementing/Decrementing Operators
- Difference between period and comma when concatenating with echo versus return?
- What does a . (dot) do in PHP?
- What does $$ (dollar dollar or double dollar) mean in PHP?
- what is "$$" in PHP
- $function() and $$variable
<?=Short Open Tags
[]Arrays(PHP 5.4 以来的短语法)
- PHP arrays... What is/are the meaning(s) of an empty bracket?
- What is the meaning of []
- Php array_push() vs myArray[]
- What does [] mean when reading from a PHP array?
- Shorthand for arrays: literal
$var = []empty array
...Argument unpacking(PHP 5.6 起)
**Exponentiation(PHP 5.6 起)
?->NullSafe Operator Calls(PHP 8.0 起)
【问题讨论】:
-
我知道这不是严格意义上的 PHP,但是包含一个指向 phpdoc.org 的链接,用于 phpDocumentor 注释语法,这是常用的,也无法搜索到
/**? -
我可以建议方括号和大括号吗?
-
我也经常遇到这个问题(无法搜索特殊字符),这就是为什么我制作了SymbolHound,一个不会忽略特殊字符的搜索引擎。我还在StackApps上发布了它。
-
嗯,从标题 为什么会这样?,我猜这是因为“主要想法是在 Stack Overflow 上提供现有问题的链接,这样更容易我们参考他们”。
-
今天(2015 年 11 月 20 日)stackoverflow.com/questions/33833259/what-is-rscat-in-php 问了一个问题 "What is $rsCat in php" )。奇怪的是,没有关于
$变量的参考,而只是关于$$变量的参考。我认为应该在某个地方进行修改。
标签: php arguments operators symbols semantics