PHP error Control operator Usage Example summary

Source: Internet
Author: User
Today, let's explain the error control operator in the PHP operator. First, let's look at what the error control operator does. The error control operator, as the name implies, is used to control the error output, which simply masks the error message and does not show it, not a real resolution of the error. The way to use it is simply to add "@" to the wrong expression. You can use this operator to mask some unnecessary error messages when you use certain functions frequently in your program, provided that this error message does not affect the operation of the program. We do not recommend the use of error controls for errors that affect program operations, which is detrimental to the elimination of program errors. Here is a place to note that our "@" error control cannot be placed before the definition of a function or class, nor can it be used in terms of conditional structure. The "@" control is only valid for an expression, and the simple point is that if you get a value from a place, we can put the @ in front of it. For example, put @ in front of variables, constants, and function calls. Let's take a look at the usage of the error control operator when we open a nonexistent file, we use "@" to block

1. PHP operator (vii) "error control operator" Walkthrough

Summary: The error control operator, as its name implies, is used to control the error output, which simply masks the error message and does not show it, not a real resolution of the error. The way to use it is simply to add "@" to the wrong expression.

2. PHP operator (i) Examples of "arithmetic operators" explained

Summary: An operator is a symbol used to evaluate a variable, constant, or data, which is a specified operation on a value or a set of values. PHP operators: Arithmetic operators, string operators, assignment operators, bitwise operators, logical operators, comparison operators, increment or decrement operators, error control operators. In the back we will explain to you separately, let us first explain the arithmetic operators in the PHP operator.

3. PHP Basic Tutorial Three operators

Summary: This section explains the contents of the arithmetic operator increment, decrement operator assignment operator string operator comparison operator bitwise operator logical operator ternary operator error control operator

4. PHP Error Control operator

Summary: PHP supports an error control operator: @. Any error messages that may be generated by the expression are ignored until it is placed in a PHP expression. If you set a custom Set_error_handler ()

5. PHP basic operators, array operators, error control operators, and basics

Introduction:: This article mainly introduces PHP basic operators, array operators, error control operators and the basic knowledge, for the PHP tutorial interested students can refer to.

6. Java Operators PHP reading notes (4)-Operators

Introduction: Java Operators: Java operators PHP reading notes (4)-Operator: What is an operator and what is an operator? The operator is an identifying symbol that tells PHP to do the related operations.  For example, you need to calculate how much 123 times 456 equals, then you need a symbol to tell the server that you need to do the multiplication. What are the operators in PHP? PHP operators are generally divided into arithmetic operators, assignment operators, comparison operators, ternary operators, logical operators, string join operators, error control operators. Arithmetic operators in PHP are mainly used for arithmetic operations, for example: addition, subtraction, multiplication

7. Front-end PHP operator, learn PHP operator _php Tutorial

Introduction: Front-end learning PHP operators, learn PHP operators. frontend php operator, learn PHP operator directory arithmetic operator assignment operator comparison operator ternary operator logical operator string operator error control operator increment recursion

8. PHP operators, process management, functions

Introduction: PHP Operators, Process Control, functions? 1, PHP operator 1.1 、???? Arithmetic operators: + 、-、 *,/,%, + + 、--1.2 、???? Assignment operators: =, + =,-=, *=,. =1.3 、???? Comparison operators: = =,! =, <>, <, >, <=, >=,? : 1.4 、???? Error control operator: PHP supports a error control

"Related question and answer recommendation":

An error control operator "@" is provided in PHP? What the hell is this "@"?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.