Move static functions further up so they are delared efore being used.
Merge branch 'PHP-5.6'