PHP Rant: Evils of hiding errors
I hate it to the core the fact that php has an @ operator. It is evil. Today's applications written in php are monstrous. If you have used the @ symbol at any point in time, you effectively may have introduced a fatal error without knowing it.
Some functions in both php and its extensions might be throwing a notice or deprecation errors which are not to be ignored. Because in the future you might want to upgrade php versions in order to take care of a critical bug. Your code should not break if this happens. If it does on a large application, the consequences are disastrous. Without the errors active, you are effectively hiding the your first indicators of where the problems are.
We should not let the management make us publish unstable code like that. It hurts the stakeholders of the application you are working on very much adversely in the future. It could be a very critical time when you had to fix this bug, but end up not knowing where the bug exists, which takes down the application which might be a big money maker for the company.
In conclusion. @ symbol should be banned right away. We should have a php setting available to turn off the effects of that symbol.
Some functions in both php and its extensions might be throwing a notice or deprecation errors which are not to be ignored. Because in the future you might want to upgrade php versions in order to take care of a critical bug. Your code should not break if this happens. If it does on a large application, the consequences are disastrous. Without the errors active, you are effectively hiding the your first indicators of where the problems are.
We should not let the management make us publish unstable code like that. It hurts the stakeholders of the application you are working on very much adversely in the future. It could be a very critical time when you had to fix this bug, but end up not knowing where the bug exists, which takes down the application which might be a big money maker for the company.
In conclusion. @ symbol should be banned right away. We should have a php setting available to turn off the effects of that symbol.
Comments
Post a Comment