Home  >  Article  >  Backend Development  >  What is php error suppressor?

What is php error suppressor?

藏色散人
藏色散人Original
2020-07-30 09:52:483393browse

php error suppressor is "@", PHP supports an error control operator, that is, "@", when the "@" symbol is placed before a PHP expression, the expression may produce any Error messages are ignored.

What is php error suppressor?

Recommended: "PHP Video Tutorial"

PHP error suppressor @ Parsing and operators take precedence Level

PHP supports an error control operator: @. When placed before a PHP expression, any error message that expression may produce is ignored.

Operator precedence

/**
 * 下列程序中请写出打印输出的结果
 * <?php
 *
 * $a = 0;
 * $b = 0;
 *
 * if ($a = 3 > 0 || $b = 3 > 0) 
 * {
 *      $a++;
 *      $b++;
 *      echo $a. "\n";
 *      echo $b. "\n";
 * }
 */
$a = 0;
$b = 0;
// 优先级顺序 > || =
if ($a = 3 > 0 || $b = 3 > 0) 
{
    $a++;
    $b++;
    echo $a. "\n";
    echo $b. "\n";
}
输出 :1 1 
($a=true,$b=1)

The above is the detailed content of What is php error suppressor?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn