Quote from LaoTseuIFIAK, the only real difference is that if you use getfenv(0), you are sure to get the real thing. If you use _G, you can get in trouble if someone decided to redefine _G somewhere.
I'm paranoid so I use getfenv(0).
... unless someone redefined getfenv() somwhere..
ACK! WHERE'S MY TINFOIL HAT?! :D