Add env() helper function
Merge pull request #6664 from antonioribeiro/env

Add env() helper function