Should I use @ in my PHP code?

后端 未结 6 1837
眼角桃花
眼角桃花 2020-12-01 21:14

If I use @ in my code, will it affect performance?

6条回答
  •  情书的邮戳
    2020-12-01 22:00

    "A foolish consistency is the hobgoblin of little minds." :) To say "never use it" is a bit of an amateurish stance, IMO. I much prefer $var = @$_POST['key'] to $var = isset($_POST['key'])? $_POST['key'] : null;

提交回复
热议问题