PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
In this situation the programmer has used the @ symbol to make sure PHP doesn't throw an undefined variable error if there was no POST data sent to the page.
In my opinion, doing this is very sloppy/lazy, I don't think the @ symbol should ever be used. The programmer could've just used
this example wasn't a very good one, it was poor programming
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
incase you have a situation where you have identical databases on 2 severs or somtin like that, instead of giving a 'cannot connect to mysql' you just go to the second sever!
d11wtq wrote:Note that in PHP5 we have try/catch which is nicer still
I personally find that use of error reporting kinda unreadable when overused, and some applications use it for EVERYTHING, cough Zend Framework. I know I've heard other people agree, but it is just an opinion.
d11wtq wrote:Note that in PHP5 we have try/catch which is nicer still
I personally find that use of error reporting kinda unreadable when overused, and some applications use it for EVERYTHING, cough Zend Framework. I know I've heard other people agree, but it is just an opinion.
It makes it easy to log exceptions to a database and hide them from users. This way you can pick up on post-release bugs in a system
d11wtq wrote:Note that in PHP5 we have try/catch which is nicer still
I personally find that use of error reporting kinda unreadable when overused, and some applications use it for EVERYTHING, cough Zend Framework. I know I've heard other people agree, but it is just an opinion.
It makes it easy to log exceptions to a database and hide them from users. This way you can pick up on post-release bugs in a system
In this situation the programmer has used the @ symbol to make sure PHP doesn't throw an undefined variable error if there was no POST data sent to the page.
In my opinion, doing this is very sloppy/lazy, I don't think the @ symbol should ever be used. The programmer could've just used
... so if the mysql_connect (or whatever function you are calling) returns an error, that error will be quieted.
On a side note, isn't anyone else around here ready strangle their IT administrators for using a (as in one) proxy server that serves internet connections to 400+ users? Man, my download rate right now is just under the speed of paint drying... under water.