我应该在这里做什么?
=& 参考
参考任务操作员在PHP, =& 什么意思是“=&”和“&="操作员在PHP? 什么意思是“&=”和“=&”操作员在PHP?
PHP 中的奇怪打印行为?
= 任命运营商
三种不同的平等
如何区分PHP平等(==双等)和身份(===三等)比较操作员?PHP!=和 ==操作员3个不同的平等类型和(严格)较大的/较小的比较在PHP
=== 比较运营商
比特币运营商
上一篇: 逻辑运营商
[ ] Arrays (自 PHP 5.4 以来简短的合成)
PHP 短标签是否可用?
二角形字符范围
# One-line shell 风格评论
NullSafe Operator 通话(自 PHP 8.0 以来)
PHP 中有“零安全操作员”吗?
PHP Strings: PHP Strings 可以用四种方式定义,而不仅仅是两种方式:
(一)单一引用:
$string = 'This is my string'; // print This is my string
二、双重引用:
$str = 'string';
$string = "This is my $str"; // print This is my string
3、继承人:
$string = <<<EOD
This is my string
EOD; // print This is my string
4) Nowdoc (自 PHP 5.3.0 以来):
$string = <<<'END_OF_STRING'
This is my string
END_OF_STRING; // print This is my string
零加热运营商(??)
此操作员已在 PHP 7.0 中添加到常见情况下,需要与 isset() 一起使用终端操作员,如果存在并非 NULL,则将其第一个操作员返回;否则将其第二个操作员返回。
<?php
// Fetches the value of $_GET['user'] and returns 'nobody'
// if it does not exist.
$username = $_GET['user'] ?? 'nobody';
// This is equivalent to:
$username = isset($_GET['user']) ? $_GET['user'] : 'nobody';
// Coalescing can be chained: this will return the first
// defined value out of $_GET['user'], $_POST['user'], and
// 'nobody'.
$username = $_GET['user'] ?? $_POST['user'] ?? 'nobody';
?>