In principle everything after closing tag ?> (char 0x3e) is extra and could cause troubles.
According to http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php this is not so:
"The closing tag for the block will include the immediately trailing newline if one is present."
The problem here could be the definition of "newline", as different operating systems have different newline defintions. But according to the Moodle Coding Guidelines (http://docs.moodle.org/en/Development:Coding):
"3. All text files should use Unix-style text format (most text editors have this as an option)."
which I guess is the most cross-platform compatible newline setting.
So any .php file that ends with a 0x3f, 0x3e, 0x0a (and no additional whitespace-only trailing characters) is OK. Template files (.html files) are another different story.
Something like this will find the files that use the DOS/Windows or Mac newline convention, instead of the Unix one, for the closing tag: (run it from the Moodle root directory):
find . -type f -exec perl -e '$/ = undef; $_ = <>; print $ARGV . "\n" if ((m#\?>\r\n?$#s))' {} ";"
Maybe something like this could be used in the pre-commit hook of the CVS to catch this things before they enter the repository, coupled with the perl script shown at http://moodle.org/mod/forum/discuss.php?d=79683#p362067 to detect files with leading or trailing empty whitespace.
Saludos. Iñaki.