Refactor PHPUnit_Util_PHP
Initial work on #1101