Re:Five reasons why the PHP silence operator @ should be avo...
by pavel_lishin on Thursday January 10, 2013 @04:50PM
(#5040008)
We opt to use the curl functions for that.
Re:Five reasons why the PHP silence operator @ should be avo...
by maratd on Thursday January 10, 2013 @06:53PM
(#5040516)
I understand that decision, but I actively try to remove any extensions that I can do without to keep the PHP binary slim and even more reliable. My personal way of doing things, that's all. file_get_contents can do everything the curl extensions can, provided that you use the context options, so I just use that and remove curl when I compile the PHP binary.
I frequently use file_get_contents to retrieve data stored on external servers. If there is a network error or the external service goes down temporarily, it will trigger an error. I don't want my log files flooded with transient error messages that are outside of my control. Instead, I just want it to try again. @ makes this possible.