kvirri
07-14-2007, 05:16 AM
I've been working a while on a script with some friends, and someone suggested that we'd all enable messages on all errors (notices, and so on). The example that was given was "you have to run first isset() on a variable before using it, if it might not be set. That's pro, and that's how everyone does it, anyway".
I don't get one thing, what's the advantage of using such a thing? I can disable notices (since they aren't errors in themselves and scripts work, too) and just check them against whatever i need. If they are not set, they will return 0 anyway, and I will save a few cpu cycles by not running a command.
What's the whole fuss with coding in this style, and genneraly, checking a script to be notice-free?
I'm not asking this so to cause a flame (if it's a controversial subject) but I merley want to understand this stuff.
Thanks!
I don't get one thing, what's the advantage of using such a thing? I can disable notices (since they aren't errors in themselves and scripts work, too) and just check them against whatever i need. If they are not set, they will return 0 anyway, and I will save a few cpu cycles by not running a command.
What's the whole fuss with coding in this style, and genneraly, checking a script to be notice-free?
I'm not asking this so to cause a flame (if it's a controversial subject) but I merley want to understand this stuff.
Thanks!