Burhan Khalid wrote:
Jasper Bryant-Greene wrote:

Robert Cummings wrote:
[snip]
Still need to check isset() status unless you've disabled E_NOTICE which
I don't advise since it's sloppy ;)



Yeah, I usually would in a real script. Just slipped my mind when writing that example.


I would also in a real script, not use $_MyVar.

Would you care to elaborate with some reasons for this? I find it very useful as a naming convention for any sort of "external variable" or user input, so when reading my code I can immediately tell what came from where.

Prepending the variable name with an underscore happens to be what PHP does ($_SERVER, $_GET, $_POST, $_COOKIES, so on...) so it is simpler just to carry on that convention.

Jasper

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to