@#variable meaning in php?

This question already has an answer here:

  • What is the use of the @ symbol in PHP? 10 answers

  • @ is used to suppress any errors that may occur on this line of the code

    http://php.net/manual/en/language.operators.errorcontrol.php

    When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.

    I would not recommend using it at all because this may result in failure of noticing some important error/warning and make debugging a havoc. On a production environment use error_reporting setting that will prevent any errors or warning from showing up while on a development server I would recommend to turn on any error reporting


    PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.

    Link : PHP.net explanation


    @操作符关闭错误处理。

    链接地址: http://www.djcxy.com/p/57708.html

    上一篇: @ $有什么区别?

    下一篇: @#变量在PHP中的含义?