
- PHP 7 Tutorial
- PHP 7 - Home
- PHP 7 - Introduction
- PHP 7 - Performance
- PHP 7 - Environment Setup
- PHP 7 - Scalar Type Declarations
- PHP 7 - Return Type Declarations
- PHP 7 - Null Coalescing Operator
- PHP 7 - Spaceship Operator
- PHP 7 - Constant Arrays
- PHP 7 - Anonymous Classes
- PHP 7 - Closure::call()
- PHP 7 - Filtered unserialize()
- PHP 7 - IntlChar
- PHP 7 - CSPRNG
- PHP 7 - Expectations
- PHP 7 - use Statement
- PHP 7 - Error Handling
- PHP 7 - Integer Division
- PHP 7 - Session Options
- PHP 7 - Deprecated Features
- PHP 7 - Removed Extensions & SAPIs
- PHP 7 Useful Resources
- PHP 7 - Quick Guide
- PHP 7 - Useful Resources
- PHP 7 - Discussion
What does the '@' prefix do in PHP?
The ‘@’ symbol suppresses errors from getting displayed on the screen.
PHP supports an error control operator, i.e the sign (@). When it is prepended to an expression in PHP, error messages that could get generated when it uses that expression will be ignored.
If the track_errors attribute is enabled, the error message generated by the expression will be saved in the variable named $php_errormsg. This variable will be overwritten each time on every error.
It is always suggested to write code that works relevantly with error states/conditions.
- Related Articles
- What does the @ prefix do on string literals in C#?
- What does double underscore prefix do in Python variables?
- What Does the // Operator Do?
- What does the &= operator do in Python?
- What does the compareTo do in Java?
- What does the >> operator do in Python?
- What does the "===" operator do in Kotlin?
- What does [Ss]* mean in regex in PHP?
- What does the modifier transient in Java do?
- What does the modifier volatile in Java do?
- What does the method clear() do in java?
- What does the method clone() do in java?
- What does the method firstElement() do in java?
- What does the method lastElement() do in java?
- What does the method removeAllElements() do in java?

Advertisements