generic non-mw functions moved to general repo github.com/uberfuzzy/phputil