Added enviroment variable options.
Fixed references to global variables without the GLOBALS array, which borked up phpshell when injecting in a class or similar