mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-17 19:16:20 +02:00
Minor grammar/typo fix.
This commit is contained in:
@@ -72,7 +72,7 @@ This will output `$foo['bar']` if it exists, but will simply return a null and p
|
||||
|
||||
This might seem like a good idea, but there are a few undesirable tradeoffs. PHP handles expressions using an `@` in a less performant way than expressions without an `@`. Premature optimization may be the root of all programming arguments, but if performance is particularly important for your application/library it's important to understand the error control operator's performance implications.
|
||||
|
||||
Secondly, the error control operator **completely** swallows the error. The error is not displayed, and the error is not send to the error log. Also, stock/production PHP systems have no way to turn off the error control operator. While you may be correct that the error you're seeing is harmless, a different, less harmless error will be just as silent.
|
||||
Secondly, the error control operator **completely** swallows the error. The error is not displayed, and the error is not sent to the error log. Also, stock/production PHP systems have no way to turn off the error control operator. While you may be correct that the error you're seeing is harmless, a different, less harmless error will be just as silent.
|
||||
|
||||
If there's a way to avoid the error suppression operator, you should consider it. For example, our code above could be rewritten like this
|
||||
|
||||
|
Reference in New Issue
Block a user