I'm not a security guru, but this seems critical:
Note: Although the prefix parameter is optional, you will get an E_NOTICE level error if you specify no prefix, or specify an empty string as a prefix. This is a possible security hazard. Notice level errors are not displayed using the default error reporting level.
I find globals are usually evil (was taught this in computer science as well). If you find yourself with a need to use globals, then you're probably tackling the coding problem incorreclty.